mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 12:23:12 +00:00
chore: fix shortcut space checks
This commit is contained in:
parent
4e73882bf1
commit
435fe04ab3
@ -17,6 +17,7 @@ const ShortcutSpace = () => {
|
||||
const currentUser = userStore.getCurrentUser();
|
||||
const shortcutStore = useShortcutStore();
|
||||
const [shortcut, setShortcut] = useState<Shortcut>();
|
||||
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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user