refactor: rename Page component to DashboardPage, update metadata type, and fix optional chaining in resource mapping
This commit is contained in:
parent
800a863854
commit
9e4215a84d
3 changed files with 5 additions and 38 deletions
|
|
@ -14,42 +14,8 @@ import {
|
||||||
SidebarTrigger,
|
SidebarTrigger,
|
||||||
} from "@/components/ui/sidebar"
|
} from "@/components/ui/sidebar"
|
||||||
|
|
||||||
export default function Page() {
|
export default function DashboardPage() {
|
||||||
return (
|
return (
|
||||||
<SidebarProvider>
|
<div>test</div>
|
||||||
<AppSidebar />
|
|
||||||
<SidebarInset>
|
|
||||||
<header className="flex h-16 shrink-0 items-center gap-2">
|
|
||||||
<div className="flex items-center gap-2 px-4">
|
|
||||||
<SidebarTrigger className="-ml-1" />
|
|
||||||
<Separator
|
|
||||||
orientation="vertical"
|
|
||||||
className="mr-2 data-[orientation=vertical]:h-4"
|
|
||||||
/>
|
|
||||||
<Breadcrumb>
|
|
||||||
<BreadcrumbList>
|
|
||||||
<BreadcrumbItem className="hidden md:block">
|
|
||||||
<BreadcrumbLink href="#">
|
|
||||||
Building Your Application
|
|
||||||
</BreadcrumbLink>
|
|
||||||
</BreadcrumbItem>
|
|
||||||
<BreadcrumbSeparator className="hidden md:block" />
|
|
||||||
<BreadcrumbItem>
|
|
||||||
<BreadcrumbPage>Data Fetching</BreadcrumbPage>
|
|
||||||
</BreadcrumbItem>
|
|
||||||
</BreadcrumbList>
|
|
||||||
</Breadcrumb>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<div className="flex flex-1 flex-col gap-4 p-4 pt-0">
|
|
||||||
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
|
|
||||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
|
||||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
|
||||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
|
||||||
</div>
|
|
||||||
<div className="bg-muted/50 min-h-[100vh] flex-1 rounded-xl md:min-h-min" />
|
|
||||||
</div>
|
|
||||||
</SidebarInset>
|
|
||||||
</SidebarProvider>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,9 @@ import { getPayload } from "payload";
|
||||||
import config from "@payload-config";
|
import config from "@payload-config";
|
||||||
import { headers as nextHeaders } from "next/headers";
|
import { headers as nextHeaders } from "next/headers";
|
||||||
import { SiteHeader } from "@/components/frontend/SiteHeader";
|
import { SiteHeader } from "@/components/frontend/SiteHeader";
|
||||||
|
import { Metadata } from "next";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata: Metadata = {
|
||||||
description: "A gamified platform for Polaris Task Force, an Arma 3 unit.",
|
description: "A gamified platform for Polaris Task Force, an Arma 3 unit.",
|
||||||
title: "Polaris Task Force",
|
title: "Polaris Task Force",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ export default async function LogisticsStoragePage() {
|
||||||
key={resource.id}
|
key={resource.id}
|
||||||
resource={resource}
|
resource={resource}
|
||||||
amount={res.amount}
|
amount={res.amount}
|
||||||
includeSeparator={index !== structure.storedResources?.length - 1}
|
includeSeparator={index !== structure.storedResources!.length - 1}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue