From 11fe6ff3489c0b55104cc97999293374f632608a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 13 Sep 2023 12:53:29 +0200 Subject: [PATCH] fix panel being shown in auth and loading states, when it should not --- src/Panel.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Panel.tsx b/src/Panel.tsx index 1f7f2327..a8d24733 100644 --- a/src/Panel.tsx +++ b/src/Panel.tsx @@ -55,11 +55,16 @@ export const Panel = ({ active, api }: PanelProps) => { } = useProjectId(); // Render the Authentication flow if the user is not signed in. - if (!accessToken) return ; + if (!accessToken) + return ( + + ); // Momentarily wait on addonState (should be very fast) if (projectInfoLoading || !gitInfo) { - return ; + return active ? : null; } if (!projectId)