From 5334c350e20569ba24bef686428bc279b5f149a4 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Thu, 24 Jun 2021 14:46:35 +0100 Subject: [PATCH] The page was being rendered during the async router.replace call (#306) * The page was being rendered during the async router.replace call * Adding a different, slightly smaller fix --- components/Shell.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/Shell.tsx b/components/Shell.tsx index 57db5acc..59cb8cf3 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -32,11 +32,9 @@ export default function Shell(props) { if (!loading && !session) { router.replace("/auth/login"); - } else if (loading) { - return

Loading...

; } - return ( + return session ? (
- ); + ) : null; }