mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-23 13:24:24 +00:00
feat: update shortcut redirector
This commit is contained in:
@@ -62,21 +62,8 @@ const router = createBrowserRouter([
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/:workspaceName/go/:shortcutName",
|
||||
path: "/:workspaceName/:shortcutName",
|
||||
element: <ShortcutRedirector />,
|
||||
loader: async () => {
|
||||
try {
|
||||
await userService.initialState();
|
||||
await workspaceService.fetchWorkspaceList();
|
||||
} catch (error) {
|
||||
// do nth
|
||||
}
|
||||
|
||||
const { user } = userService.getState();
|
||||
if (isNullorUndefined(user)) {
|
||||
return redirect("/user/auth");
|
||||
}
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
|
Reference in New Issue
Block a user