Skip to content

Commit

Permalink
display logout button in peers and mirror pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Nov 27, 2023
1 parent 440d5e6 commit 9ccdba1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ui/app/mirrors/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import SidebarComponent from '@/components/SidebarComponent';
import { Layout } from '@/lib/Layout';
import { cookies } from 'next/headers';
import { PropsWithChildren } from 'react';

export default function PageLayout({ children }: PropsWithChildren) {
return <Layout sidebar={<SidebarComponent />}>{children}</Layout>;
return (
<Layout sidebar={<SidebarComponent logout={!!cookies().get('auth')} />}>
{children}
</Layout>
);
}
7 changes: 6 additions & 1 deletion ui/app/peers/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import SidebarComponent from '@/components/SidebarComponent';
import { Layout } from '@/lib/Layout';
import { cookies } from 'next/headers';
import { PropsWithChildren } from 'react';

export default function PageLayout({ children }: PropsWithChildren) {
return <Layout sidebar={<SidebarComponent />}>{children}</Layout>;
return (
<Layout sidebar={<SidebarComponent logout={!!cookies().get('auth')} />}>
{children}
</Layout>
);
}

0 comments on commit 9ccdba1

Please sign in to comment.