Skip to content

Commit

Permalink
feat: remove splash screen for unauthenticated users
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel-Melon committed Dec 17, 2024
1 parent e6d72bd commit 922f481
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/admin/src/Layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
router.replace(router.asPath);
};

if (!session) {
if (!session && !isAuthRoute) {
return <SplashScreen />;
}

Expand All @@ -114,7 +114,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
header="Admin"
onSignOut={onSignOut}
user={{
...session.user,
...session?.user,
...currentUser
}}
/>
Expand Down
4 changes: 2 additions & 2 deletions apps/agent/src/Layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
};


if (!session) {
if (!session && !isAuthRoute) {
return <SplashScreen />;
}
return (
Expand All @@ -102,7 +102,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
header="Agent"
onSignOut={onSignOut}
user={{
...session.user,
...session?.user,
...currentUser
}}
/>
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/Layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
};


if (!session) {
if (!session && !isAuthRoute) {
return <SplashScreen />;
}
return (
Expand All @@ -116,7 +116,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
header="Client"
onSignOut={onSignOut}
user={{
...session.user,
...session?.user,
...currentUser
}}
/>
Expand Down
4 changes: 2 additions & 2 deletions apps/courier/src/Layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
};


if (!session) {
if (!session && !isAuthRoute) {
return <SplashScreen />;
}
return (
Expand All @@ -117,7 +117,7 @@ export default function Layout({ children, ...props }: LayoutProps) {
header="Courier"
onSignOut={onSignOut}
user={{
...session.user,
...session?.user,
...currentUser
}}
/>
Expand Down

0 comments on commit 922f481

Please sign in to comment.