Page MenuHomePhabricator

D5334.diff
No OneTemporary

D5334.diff

diff --git a/landing/investor-profile.react.js b/landing/investor-profile.react.js
--- a/landing/investor-profile.react.js
+++ b/landing/investor-profile.react.js
@@ -9,20 +9,21 @@
+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 (
- <div className={css.profile}>
+ <a className={css.profile} onClick={onClick}>
<img alt={`image of Comm investor ${name}`} src={imageURL} />
<div className={css.investorInfoContainer}>
<p className={css.name}>{name}</p>
<p className={css.description}>{description}</p>
<p className={css.involvement}>{involvement}</p>
</div>
- </div>
+ </a>
);
}
diff --git a/landing/landing.react.js b/landing/landing.react.js
--- a/landing/landing.react.js
+++ b/landing/landing.react.js
@@ -3,6 +3,11 @@
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';
@@ -19,6 +24,16 @@
import './global.css';
function Landing(): React.Node {
+ const modalContext = useModalContext();
+
+ const modals = React.useMemo(
+ () =>
+ modalContext.modals.map(([modal, key]) => (
+ <React.Fragment key={key}>{modal}</React.Fragment>
+ )),
+ [modalContext.modals],
+ );
+
useScrollToTopOnNavigate();
const onPrivacy = useRouteMatch({ path: '/privacy' });
const onTerms = useRouteMatch({ path: '/terms' });
@@ -75,8 +90,17 @@
{header}
{activePage}
{footer}
+ {modals}
</>
);
}
-export default Landing;
+function LandingWithProvider(): React.Node {
+ return (
+ <ModalProvider>
+ <Landing />
+ </ModalProvider>
+ );
+}
+
+export default LandingWithProvider;

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 7:10 PM (18 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2854032
Default Alt Text
D5334.diff (2 KB)

Event Timeline