1
0
Fork 0
mirror of https://codeberg.org/MarkusThielker/next-ory.git synced 2025-07-03 05:19:18 +00:00

NORY-8: add sidebar to the application

Moved theme toggle and logout button to the footer of the sidebar
This commit is contained in:
Markus Thielker 2024-12-01 10:53:04 +01:00
parent 7d04a8faa1
commit 101601c287
No known key found for this signature in database
6 changed files with 121 additions and 33 deletions

View file

@ -0,0 +1,3 @@
export default async function ApplicationPage() {
return <></>;
}

View file

@ -5,6 +5,8 @@ import { cn } from '@/lib/utils';
import { Toaster } from '@/components/ui/sonner';
import React from 'react';
import { ThemeProvider } from 'next-themes';
import { SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar';
import { AppSidebar } from '@/components/app-sidebar';
const inter = Inter({ subsets: ['latin'] });
@ -53,8 +55,14 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
enableSystem
disableTransitionOnChange
>
{children}
<Toaster/>
<SidebarProvider>
<AppSidebar/>
<SidebarTrigger className="m-2"/>
<main className="w-full min-h-screen">
{children}
<Toaster/>
</main>
</SidebarProvider>
</ThemeProvider>
</main>
</body>

View file

@ -1,16 +1,3 @@
'use server';
import React from 'react';
import { ThemeToggle } from '@/components/themeToggle';
import { LogoutButton } from '@/components/auth/logout';
export default async function Page() {
return (
<div className="flex flex-col min-h-screen items-center text-3xl relative space-y-4">
<div className="absolute flex flex-row w-fit items-center space-x-4 top-4 right-4">
<ThemeToggle/>
<LogoutButton/>
</div>
</div>
);
export default async function RootPage() {
return <></>;
}

View file

@ -0,0 +1,3 @@
export default async function UserPage() {
return <></>;
}