From 4ba0bcd41676088c7e539da50bc5207b910203d1 Mon Sep 17 00:00:00 2001 From: keyan Date: Fri, 24 Sep 2021 18:51:07 -0500 Subject: [PATCH] fix lightning when loading session --- components/header.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/header.js b/components/header.js index 41d30277..9d41a8dc 100644 --- a/components/header.js +++ b/components/header.js @@ -33,11 +33,7 @@ export default function Header () { const [session, loading] = useSession() const Corner = () => { - if (loading && !me) { - return null - } - - if (session) { + if (me) { return (
@@ -101,6 +97,9 @@ export default function Header () {
) } else { + if (loading || session) { + return null + } const strike = useLightning() useEffect(() => { setTimeout(strike, randInRange(3000, 10000))