diff options
author | Vitaly Takmazov | 2022-10-28 00:14:01 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:58 +0300 |
commit | 40d411e516efee5531404725b45ab89d97172ce8 (patch) | |
tree | d675e93fc52ef50a40343219e1b992867964d3bf /vnext/src/App.js | |
parent | 2146a98bd98b7e275a0ee7bc7a243981b597f34c (diff) |
Initial SSR
Diffstat (limited to 'vnext/src/App.js')
-rw-r--r-- | vnext/src/App.js | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js index c3d4e5aa..b56e0300 100644 --- a/vnext/src/App.js +++ b/vnext/src/App.js @@ -24,7 +24,7 @@ const elClassHidden = 'header--hidden'; const elClassTop = 'content--top'; -export default function App() { +export default function App({ footer }) { let contentRef = useRef(null); const [cookie, setCookie] = useCookies(['hash']); @@ -37,7 +37,7 @@ export default function App() { let retpath = params.retpath || `${window.location.protocol}//${window.location.host}${window.location.pathname}`; window.history.replaceState({}, document.title, retpath); } - }, []); + }, [setCookie, footer]); /** * @type {import('./api').SecureUser} @@ -150,26 +150,35 @@ export default function App() { <> <Header visitor={visitor} className={scrollState.hidden ? elClassHidden : ''} /> <div id="content_wrapper"> - { - visitor.uid > 0 && + { <aside id="sidebar"> <div id="sidebar_wrapper"> - <Link to="/?show=my"> - <Icon name="ei-clock" size="s" /> - <span className="desktop">My feed</span> - </Link> - <Link to="/pm"> - <Icon name="ei-envelope" size="s" /> - <span className="desktop">Messages</span> - </Link> - <Link to="/?show=discuss"> - <Icon name="ei-bell" size="s" /> - <span className="desktop">Discussions</span> - </Link> - <Link to="/settings" rel="nofollow"> - <Icon name="ei-gear" size="s" /> - <span className="desktop">Settings</span> - </Link> + {visitor.uid > 0 && (<> + <Link to="/?show=my"> + <Icon name="ei-clock" size="s" /> + <span className="desktop">My feed</span> + </Link> + <Link to="/pm"> + <Icon name="ei-envelope" size="s" /> + <span className="desktop">Messages</span> + </Link> + <Link to="/?show=discuss"> + <Icon name="ei-bell" size="s" /> + <span className="desktop">Discussions</span> + </Link> + <Link to="/settings" rel="nofollow"> + <Icon name="ei-gear" size="s" /> + <span className="desktop">Settings</span> + </Link> + </>)} + <div id="footer" className="desktop"> + <div id="footer-left">juick.com © 2008-2022 + {footer && (<><br />Sponsors: <span dangerouslySetInnerHTML={{ __html: footer }}></span></>)}</div> + <div id="footer-right"> + · <Link href="/help/contacts" rel="nofollow">Contacts</Link> + · <Link href="/help/tos" rel="nofollow">TOS</Link> + </div> + </div> </div> </aside> } |