Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3747391
D5334.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5334.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5334: [landing] introduced modal boilerplate
Attached
Detach File
Event Timeline
Log In to Comment