User Access
Deploy / deploy (push) Successful in 2m3s

This commit is contained in:
twotalesanimation
2026-08-18 15:23:22 +02:00
parent ecf47e56cc
commit 9dcf310806
14 changed files with 334 additions and 9 deletions
+19
View File
@@ -0,0 +1,19 @@
"use client";
import { usePathname } from "next/navigation";
import { Sidebar } from "@/components/layout/sidebar";
export function AppShell({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
if (pathname === "/login") {
return <main className="h-full overflow-y-auto">{children}</main>;
}
return (
<div className="flex h-full overflow-hidden">
<Sidebar />
<main className="flex-1 overflow-y-auto">{children}</main>
</div>
);
}
+9
View File
@@ -2,6 +2,7 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
import { signOut } from "next-auth/react";
import { cn } from "@/lib/utils";
import {
LayoutDashboard,
@@ -13,6 +14,7 @@ import {
ChevronLeft,
ChevronRight,
Settings,
LogOut,
} from "lucide-react";
import { useState } from "react";
@@ -89,6 +91,13 @@ export function Sidebar() {
</Link>
);
})()}
<button
onClick={() => signOut({ callbackUrl: "/login" })}
className="flex w-full items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors"
>
<LogOut className="h-4 w-4 flex-shrink-0" />
{!collapsed && <span>Sign out</span>}
</button>
</div>
<button
onClick={() => setCollapsed(!collapsed)}