Skip to content

Commit

Permalink
fixing layout. Render was being auto-disabled since the session objec…
Browse files Browse the repository at this point in the history
…t's structure seems to be slightly different in authv5 from what it was in v4
  • Loading branch information
siddheshraze committed Feb 5, 2025
1 parent e2811bb commit 528966c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/app/(hub)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {
const [isSidebarVisible, setSidebarVisible] = useState(!!session);

const [isFeedbackModalOpen, setIsFeedbackModalOpen] = useState(false);
const pathname = usePathname();
const pathname = usePathname() ?? '';
const coreDataLoaded = siteListLoaded && plotListLoaded && censusListLoaded && quadratListLoaded;
const { isPulsing } = useLockAnimation();

Expand Down Expand Up @@ -386,7 +386,7 @@ export default function HubLayout({ children }: { children: React.ReactNode }) {
paddingLeft: 2
}}
>
{session?.user.name && session.user.email && session.user.userStatus && <>{children}</>}
{session && <>{children}</>}
</Box>
<Divider orientation="horizontal" />
<Box
Expand Down
1 change: 1 addition & 0 deletions frontend/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Providers } from './providers';
import { LockAnimationProvider } from './contexts/lockanimationcontext';

export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
console.log('root layout encountered. loading...');
return (
<html lang="en" suppressContentEditableWarning suppressHydrationWarning className={'dark'}>
<head>
Expand Down

0 comments on commit 528966c

Please sign in to comment.