diff --git a/landing/feature-modal.react.js b/landing/feature-modal.react.js
index fe64b1a5f..1797e444a 100644
--- a/landing/feature-modal.react.js
+++ b/landing/feature-modal.react.js
@@ -1,76 +1,82 @@
// @flow
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import * as React from 'react';
import ModalOverlay from 'lib/components/modal-overlay.react.js';
import { useModalContext } from 'lib/components/modal-provider.react.js';
import type { FeatureComparison, Competitor } from './competitor-data.js';
import CompetitorFeature from './competitor-feature.react.js';
import css from './feature-modal.css';
import typography from './typography.css';
type Props = {
+competitor: Competitor,
+feature: FeatureComparison,
};
function FeatureModal(props: Props): React.Node {
const { competitor, feature } = props;
const { popModal } = useModalContext();
const furtherReadingClassName = classNames(
typography.paragraph1,
css.furtherReadingsText,
);
const linkClassName = classNames([typography.paragraph2, css.linkText]);
const furtherReadingLinks = React.useMemo(() => {
if (!feature.furtherReadingLinks) {
return null;
}
const links = feature.furtherReadingLinks.map((link, index) => (
-
+
{link}
));
return (
);
}, [feature.furtherReadingLinks, furtherReadingClassName, linkClassName]);
return (
);
}
export default FeatureModal;
diff --git a/landing/footer.react.js b/landing/footer.react.js
index 0a1ff9a69..1f378d027 100644
--- a/landing/footer.react.js
+++ b/landing/footer.react.js
@@ -1,137 +1,149 @@
// @flow
import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons';
import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import * as React from 'react';
import { NavLink } from 'react-router-dom';
import css from './footer.css';
import typography from './typography.css';
const navLinkProps = {
activeStyle: {
color: 'white',
fontWeight: '500',
},
};
function Footer(): React.Node {
const logoClassName = classNames([typography.heading2, css.logo]);
const navLinkClassName = classNames([typography.paragraph1, css.links]);
const legalTextClassName = classNames([
typography.paragraph2,
css.copyrightText,
]);
const legalLinksClassName = classNames([typography.paragraph2, css.links]);
return (
);
}
export default Footer;
diff --git a/landing/header.react.js b/landing/header.react.js
index 6cbb08f27..1297728df 100644
--- a/landing/header.react.js
+++ b/landing/header.react.js
@@ -1,122 +1,130 @@
// @flow
import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons';
import {
faExternalLinkAlt,
faBars,
faTimes,
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import * as React from 'react';
import { NavLink } from 'react-router-dom';
import type { SetState } from 'lib/types/hook-types.js';
import css from './header.css';
import typography from './typography.css';
// This value comes from the breakpoint value in header.css. Please make sure
// that this value is in sync with header.css if ever changed
export const HEADER_BREAKPOINT = 848; // px
type Props = {
+showMobileNav: boolean,
+setShowMobileNav: SetState,
};
function Header(props: Props): React.Node {
const { showMobileNav, setShowMobileNav } = props;
const headerContentContainerClassName = classNames({
[css.headerNavContentContainer]: true,
[css.headerContainerMobileNavActive]: showMobileNav,
});
const logoTextClassName = classNames([typography.heading2, css.logoText]);
const badgeClassName = classNames([typography.paragraph2, css.betaBadge]);
const navLinkClassName = classNames([typography.subheading2, css.tab]);
const onClickLogo = React.useCallback(() => {
setShowMobileNav(false);
}, [setShowMobileNav]);
const onClickMobileNavIcon = React.useCallback(() => {
setShowMobileNav(!showMobileNav);
}, [setShowMobileNav, showMobileNav]);
return (
);
}
export default Header;
diff --git a/landing/mobile-nav.react.js b/landing/mobile-nav.react.js
index b4e995ed5..19b89ed1f 100644
--- a/landing/mobile-nav.react.js
+++ b/landing/mobile-nav.react.js
@@ -1,83 +1,91 @@
// @flow
import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import * as React from 'react';
import { NavLink } from 'react-router-dom';
import type { SetState } from 'lib/types/hook-types.js';
import css from './mobile-nav.css';
import typography from './typography.css';
type Props = {
+showMobileNav: boolean,
+setShowMobileNav: SetState,
};
function MobileNav(props: Props): React.Node {
const { showMobileNav, setShowMobileNav } = props;
const navLinkClassName = classNames([typography.paragraph2, css.tab]);
const mobileNavClassName = classNames({
[css.mobileNav]: true,
[css.activeMobileNav]: showMobileNav,
});
const onClickTab = React.useCallback(() => {
setShowMobileNav(false);
}, [setShowMobileNav]);
return (
);
}
export default MobileNav;