initial release testing
This commit is contained in:
47
app/layout.tsx
Normal file
47
app/layout.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { ReactNode } from "react";
|
||||
import type { Metadata } from "next";
|
||||
import { LogoutButton } from "@/components/logout-button";
|
||||
import { Sidebar } from "@/components/sidebar";
|
||||
import { getSession } from "@/lib/auth";
|
||||
import "./globals.css";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Inven",
|
||||
description: "Inventory management with kits, sales, purchasing, and accounting."
|
||||
};
|
||||
|
||||
export default async function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
|
||||
const session = await getSession();
|
||||
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
<div className="shell">
|
||||
<section className="hero">
|
||||
<h1>Inven Control Center</h1>
|
||||
<p>
|
||||
A single-container operating system for stocked parts, kit assemblies, purchasing, shipping, customer
|
||||
records, vendor records, and accounting visibility.
|
||||
</p>
|
||||
{session ? (
|
||||
<div className="toolbar">
|
||||
<span className="muted">
|
||||
Signed in as {session.email} ({session.role})
|
||||
</span>
|
||||
<LogoutButton />
|
||||
</div>
|
||||
) : null}
|
||||
</section>
|
||||
{session ? (
|
||||
<div className="layout">
|
||||
<Sidebar />
|
||||
<main className="content">{children}</main>
|
||||
</div>
|
||||
) : (
|
||||
<main className="content" style={{ marginTop: 24 }}>{children}</main>
|
||||
)}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user