change layout and router panel & design page dashboard and user account
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import DashboardPage from "@/components/panel/dashboard";
|
||||
import Information from '@/data/information.json';
|
||||
|
||||
function Dashboard() {
|
||||
return (
|
||||
<DashboardPage data={Information} />
|
||||
)
|
||||
}
|
||||
|
||||
export default Dashboard
|
||||
@@ -0,0 +1,29 @@
|
||||
'use client';
|
||||
|
||||
import Header from "@/components/layoutPanel/header";
|
||||
import Sidebar from "@/components/layoutPanel/sidebar";
|
||||
import Information from '@/data/information.json';
|
||||
import UserDetail from "@/components/layoutPanel/userDetail";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
function LayoutPanel({ children }) {
|
||||
|
||||
const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen">
|
||||
<Sidebar />
|
||||
<main className="w-full">
|
||||
<Header />
|
||||
<section className="my-[24px] opacity-element mx-[16px] bg-[#FAFAFA]">
|
||||
{children}
|
||||
</section>
|
||||
</main>
|
||||
{pathname.includes('dashboard') && (
|
||||
<UserDetail data={Information} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default LayoutPanel
|
||||
@@ -0,0 +1,10 @@
|
||||
import UserAccountPage from "@/components/panel/userAccount"
|
||||
import Information from '@/data/information.json';
|
||||
|
||||
function UserAccount() {
|
||||
return (
|
||||
<UserAccountPage data={Information} />
|
||||
)
|
||||
}
|
||||
|
||||
export default UserAccount
|
||||
@@ -1,13 +0,0 @@
|
||||
import PanelPage from "@/components/panel";
|
||||
import LayoutPanel from "@/components/layoutPanel";
|
||||
import Information from '../../data/information.json';
|
||||
|
||||
function Panel() {
|
||||
return (
|
||||
<LayoutPanel data={Information}>
|
||||
<PanelPage data={Information} />
|
||||
</LayoutPanel>
|
||||
)
|
||||
}
|
||||
|
||||
export default Panel
|
||||
Reference in New Issue
Block a user