There was an error while loading. Please reload this page.
1 parent 4e73882 commit 435fe04Copy full SHA for 435fe04
1 file changed
frontend/web/src/pages/ShortcutSpace.tsx
@@ -17,6 +17,7 @@ const ShortcutSpace = () => {
17
const currentUser = userStore.getCurrentUser();
18
const shortcutStore = useShortcutStore();
19
const [shortcut, setShortcut] = useState<Shortcut>();
20
+ const [loading, setLoading] = useState(true);
21
const [showCreateShortcutDrawer, setShowCreateShortcutDrawer] = useState(false);
22
23
useEffect(() => {
@@ -28,9 +29,14 @@ const ShortcutSpace = () => {
28
29
console.error(error);
30
toast.error(error.details);
31
}
32
+ setLoading(false);
33
})();
34
}, [shortcutName]);
35
36
+ if (loading) {
37
+ return null;
38
+ }
39
+
40
if (!shortcut) {
41
if (!currentUser) {
42
navigateTo("/404");
0 commit comments