diff --git a/frontend/web/src/pages/ShortcutSpace.tsx b/frontend/web/src/pages/ShortcutSpace.tsx index 1ff4621d..030b660b 100644 --- a/frontend/web/src/pages/ShortcutSpace.tsx +++ b/frontend/web/src/pages/ShortcutSpace.tsx @@ -17,6 +17,7 @@ const ShortcutSpace = () => { const currentUser = userStore.getCurrentUser(); const shortcutStore = useShortcutStore(); const [shortcut, setShortcut] = useState(); + const [loading, setLoading] = useState(true); const [showCreateShortcutDrawer, setShowCreateShortcutDrawer] = useState(false); useEffect(() => { @@ -28,9 +29,14 @@ const ShortcutSpace = () => { console.error(error); toast.error(error.details); } + setLoading(false); })(); }, [shortcutName]); + if (loading) { + return null; + } + if (!shortcut) { if (!currentUser) { navigateTo("/404");