Added simple sidebar
This commit is contained in:
8
src/app/(admin)/dashboard/create/page.tsx
Normal file
8
src/app/(admin)/dashboard/create/page.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
export default function DashboardCreatePage() {
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1 className="text-2xl font-bold text-gray-900 mb-4">Create</h1>
|
||||
<p className="text-gray-600">This is the create page where you can add new items.</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
16
src/app/(admin)/dashboard/layout.tsx
Normal file
16
src/app/(admin)/dashboard/layout.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { DashboardSidebar } from "@/components/dashboard/sidebar"
|
||||
import { SidebarProvider } from "@/components/ui/sidebar"
|
||||
import { ReactNode } from "react"
|
||||
|
||||
export default function DashboardLayout({
|
||||
children
|
||||
}: {
|
||||
children: ReactNode
|
||||
}) {
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<DashboardSidebar />
|
||||
{children}
|
||||
</SidebarProvider>
|
||||
)
|
||||
}
|
||||
8
src/app/(admin)/dashboard/list/page.tsx
Normal file
8
src/app/(admin)/dashboard/list/page.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
export default function DashboardListPage() {
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1 className="text-2xl font-bold text-gray-900 mb-4">List</h1>
|
||||
<p className="text-gray-600">This is the list page where you can view all items.</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
16
src/app/(admin)/dashboard/page.tsx
Normal file
16
src/app/(admin)/dashboard/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { getSession } from "@/lib/auth/session"
|
||||
|
||||
export default async function Dashboard() {
|
||||
const { session, redirect } = await getSession()
|
||||
|
||||
if (!session) {
|
||||
redirect("/sign-in")
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="p-6">
|
||||
<h1 className="text-2xl font-bold text-gray-900 mb-4">Dashboard</h1>
|
||||
<p className="text-gray-600">Welcome to your dashboard! Use the sidebar to navigate to different sections.</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user