From 40d411e516efee5531404725b45ab89d97172ce8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 28 Oct 2022 00:14:01 +0300 Subject: Initial SSR --- vnext/src/App.js | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) (limited to 'vnext/src/App.js') 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() { <>
- { - visitor.uid > 0 && + { } -- cgit v1.2.3