33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { ConversationList } from "@/components/chat/ConversationList";
|
|
import { logout } from "@/lib/auth";
|
|
import { LogOut } from "lucide-react";
|
|
|
|
export default function AppLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<div className="flex h-screen overflow-hidden bg-white text-gray-900">
|
|
<div className="flex w-80 flex-col border-r border-gray-200">
|
|
<div className="flex-1 overflow-y-auto">
|
|
<ConversationList />
|
|
</div>
|
|
<div className="border-t border-gray-200 p-4">
|
|
<form action={logout}>
|
|
<button
|
|
type="submit"
|
|
className="flex w-full items-center justify-center gap-2 rounded-md bg-gray-50 px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
>
|
|
<LogOut className="h-4 w-4" />
|
|
Sign out
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div className="flex min-w-0 flex-1 flex-col bg-gray-50">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
} |