Skip to content

Commit 435fe04

Browse files
committed
chore: fix shortcut space checks
1 parent 4e73882 commit 435fe04

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

frontend/web/src/pages/ShortcutSpace.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const ShortcutSpace = () => {
1717
const currentUser = userStore.getCurrentUser();
1818
const shortcutStore = useShortcutStore();
1919
const [shortcut, setShortcut] = useState<Shortcut>();
20+
const [loading, setLoading] = useState(true);
2021
const [showCreateShortcutDrawer, setShowCreateShortcutDrawer] = useState(false);
2122

2223
useEffect(() => {
@@ -28,9 +29,14 @@ const ShortcutSpace = () => {
2829
console.error(error);
2930
toast.error(error.details);
3031
}
32+
setLoading(false);
3133
})();
3234
}, [shortcutName]);
3335

36+
if (loading) {
37+
return null;
38+
}
39+
3440
if (!shortcut) {
3541
if (!currentUser) {
3642
navigateTo("/404");

0 commit comments

Comments
 (0)