diff --git a/landing/investor-profile.react.js b/landing/investor-profile.react.js index 0b27f69c6..14fae8f1a 100644 --- a/landing/investor-profile.react.js +++ b/landing/investor-profile.react.js @@ -1,29 +1,30 @@ // @flow import * as React from 'react'; import css from './investor-profile.css'; type Props = { +name: string, +description: string, +involvement: ?string, +imageURL: string, + +onClick: () => void, }; function InvestorProfile(props: Props): React.Node { - const { name, description, involvement, imageURL } = props; + const { name, description, involvement, imageURL, onClick } = props; return ( -
+ {`image

{name}

{description}

{involvement}

-
+ ); } export default InvestorProfile; diff --git a/landing/landing.react.js b/landing/landing.react.js index e288139af..1e925fff1 100644 --- a/landing/landing.react.js +++ b/landing/landing.react.js @@ -1,82 +1,106 @@ // @flow import * as React from 'react'; import { useRouteMatch } from 'react-router-dom'; +import { + ModalProvider, + useModalContext, +} from 'lib/components/modal-provider.react'; + import AppLanding from './app-landing.react'; import Footer from './footer.react'; import Header from './header.react'; import Investors from './investors.react'; import Keyservers from './keyservers.react'; import Privacy from './privacy.react'; import QR from './qr.react'; import SIWE from './siwe.react'; import Support from './support.react'; import Team from './team.react'; import Terms from './terms.react'; import useScrollToTopOnNavigate from './use-scroll-to-top-on-navigate.react'; import './reset.css'; import './global.css'; function Landing(): React.Node { + const modalContext = useModalContext(); + + const modals = React.useMemo( + () => + modalContext.modals.map(([modal, key]) => ( + {modal} + )), + [modalContext.modals], + ); + useScrollToTopOnNavigate(); const onPrivacy = useRouteMatch({ path: '/privacy' }); const onTerms = useRouteMatch({ path: '/terms' }); const onSupport = useRouteMatch({ path: '/support' }); const onKeyservers = useRouteMatch({ path: '/keyservers' }); const onQR = useRouteMatch({ path: '/qr' }); const onTeam = useRouteMatch({ path: '/team' }); const onInvestors = useRouteMatch({ path: '/investors' }); const onSIWE = useRouteMatch({ path: '/siwe' }); const activePage = React.useMemo(() => { if (onPrivacy) { return ; } else if (onTerms) { return ; } else if (onSupport) { return ; } else if (onKeyservers) { return ; } else if (onQR) { return ; } else if (onSIWE) { return ; } else if (onTeam) { return ; } else if (onInvestors) { return ; } else { return ; } }, [ onKeyservers, onPrivacy, onSupport, onTerms, onTeam, onInvestors, onQR, onSIWE, ]); let header =
; if (onQR || onSIWE) { header = null; } let footer =