Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3407330
D7766.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
677 B
Referenced Files
None
Subscribers
None
D7766.diff
View Options
diff --git a/landing/landing.react.js b/landing/landing.react.js
--- a/landing/landing.react.js
+++ b/landing/landing.react.js
@@ -76,15 +76,21 @@
}
}, [onKeyservers, onPrivacy, onSupport, onTerms, onTeam, onInvestors, onQR]);
- let header = <Header />;
- if (onQR) {
- header = null;
- }
+ const header = React.useMemo(() => {
+ if (onQR) {
+ return null;
+ }
- let footer = <Footer />;
- if (onQR) {
- footer = null;
- }
+ return <Header />;
+ }, [onQR]);
+
+ const footer = React.useMemo(() => {
+ if (onQR) {
+ return null;
+ }
+
+ return <Footer />;
+ }, [onQR]);
return (
<div className={css.container}>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 5, 5:44 AM (14 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2614801
Default Alt Text
D7766.diff (677 B)
Attached To
Mode
D7766: [landing] memoize header and footer
Attached
Detach File
Event Timeline
Log In to Comment