diff --git a/landing/header.react.js b/landing/header.react.js index b56925b3c..cd76a1aca 100644 --- a/landing/header.react.js +++ b/landing/header.react.js @@ -1,155 +1,155 @@ // @flow import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons'; import { faExternalLinkAlt, faBars, faTimes, faDownload, } 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 FarcasterLogo from './assets/farcaster-logo.react.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 = 904; // 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 1a62ef386..b2e1daa24 100644 --- a/landing/mobile-nav.react.js +++ b/landing/mobile-nav.react.js @@ -1,108 +1,108 @@ // @flow import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons'; import { faDownload } 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 FarcasterLogo from './assets/farcaster-logo.react.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 dismissMobileNav = React.useCallback(() => { setShowMobileNav(false); }, [setShowMobileNav]); return ( ); } export default MobileNav;