test new layout

This commit is contained in:
miloschwartz
2025-04-12 15:04:32 -04:00
parent f14379a1c8
commit 1a750e8279
38 changed files with 992 additions and 1622 deletions

View File

@@ -1,7 +1,5 @@
import { Metadata } from "next";
import { TopbarNav } from "@app/components/TopbarNav";
import { Users } from "lucide-react";
import { Header } from "@app/components/Header";
import { verifySession } from "@app/lib/auth/verifySession";
import { redirect } from "next/navigation";
import { cache } from "react";
@@ -10,6 +8,7 @@ import { ListOrgsResponse } from "@server/routers/org";
import { internal } from "@app/lib/api";
import { AxiosResponse } from "axios";
import { authCookieHeader } from "@app/lib/api/cookies";
import { Layout } from "@app/components/Layout";
export const dynamic = "force-dynamic";
@@ -18,7 +17,7 @@ export const metadata: Metadata = {
description: ""
};
const topNavItems = [
const navItems = [
{
title: "All Users",
href: "/admin/users",
@@ -30,7 +29,7 @@ interface LayoutProps {
children: React.ReactNode;
}
export default async function SettingsLayout(props: LayoutProps) {
export default async function AdminLayout(props: LayoutProps) {
const getUser = cache(verifySession);
const user = await getUser();
@@ -51,21 +50,10 @@ export default async function SettingsLayout(props: LayoutProps) {
} catch (e) {}
return (
<>
<div className="w-full bg-card sm:px-0 fixed top-0 z-10 border-b">
<div className="container mx-auto flex flex-col content-between">
<div className="my-4 px-3 md:px-0">
<UserProvider user={user}>
<Header orgId={""} orgs={orgs} />
</UserProvider>
</div>
<TopbarNav items={topNavItems} />
</div>
</div>
<div className="container mx-auto sm:px-0 px-3 pt-[155px]">
<UserProvider user={user}>
<Layout orgs={orgs} navItems={navItems}>
{props.children}
</div>
</>
</Layout>
</UserProvider>
);
}