Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
still allow admin route even if no custom routes are loaded in case r…
Browse files Browse the repository at this point in the history
…outes fail to load
  • Loading branch information
HexaField committed Oct 26, 2023
1 parent b6813f9 commit 65ec78f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/client/src/route/public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ function RouterComp({ route }: { route: string }) {
AuthService.doLoginAuto()
}, [])

if (!customRoutes.length || !isLoggedIn.value) {
// still allow admin even if no custom routes are loaded in case routes fail to load
if ((route !== 'admin' && !customRoutes.length) || !isLoggedIn.value) {
return <LoadingCircle message={t('common:loader.loadingRoutes')} />
}

Expand All @@ -64,12 +65,12 @@ function RouterComp({ route }: { route: string }) {
case 'studio':
RouteElement = $studio
break
case 'admin':
RouteElement = $admin
break
case 'location':
RouteElement = $location
break
case 'admin':
RouteElement = $admin
break
}

return (
Expand Down

0 comments on commit 65ec78f

Please sign in to comment.