diff --git a/app/(admin)/about/loading.tsx b/app/(admin)/about/loading.tsx index 8991eec..0f7a41b 100644 --- a/app/(admin)/about/loading.tsx +++ b/app/(admin)/about/loading.tsx @@ -1,38 +1,41 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function AboutLoading() { return ( - - - - - - - - -
-
- - + + + + + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
-
- - -
-
- - -
-
- - -
-
- -
-
- - + + + ); } diff --git a/app/(admin)/about/page.tsx b/app/(admin)/about/page.tsx index 40cfef9..2cb2e1f 100644 --- a/app/(admin)/about/page.tsx +++ b/app/(admin)/about/page.tsx @@ -3,12 +3,13 @@ import { redirect } from 'next/navigation'; import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import AboutForm from '@/components/admin/about-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function AboutPage() { @@ -25,16 +26,18 @@ export default async function AboutPage() { }); return ( - - - About - - Manage your about section informations. - - - - - - + + + + About + + Manage your about section informations. + + + + + + + ); } diff --git a/app/(admin)/account/loading.tsx b/app/(admin)/account/loading.tsx index b4b9df3..4e59bf8 100644 --- a/app/(admin)/account/loading.tsx +++ b/app/(admin)/account/loading.tsx @@ -1,63 +1,66 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function AccountLoading() { return ( -
- - - - - - - - -
-
- - + +
+ + + + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
-
- - + + + + + + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
-
- - -
-
- -
-
-
-
- - - - - - - - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-
-
+ + +
+ ); } diff --git a/app/(admin)/account/page.tsx b/app/(admin)/account/page.tsx index 34cad3b..0054e6c 100644 --- a/app/(admin)/account/page.tsx +++ b/app/(admin)/account/page.tsx @@ -4,12 +4,13 @@ import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import ProfileForm from '@/components/admin/profile-form'; import PasswordForm from '@/components/admin/password-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function AccountPage() { @@ -31,27 +32,29 @@ export default async function AccountPage() { }); return ( -
- - - Profile - - Manage your account profile informations. - - - - - - - - - Password - Manage your account password. - - - - - -
+ +
+ + + Profile + + Manage your account profile informations. + + + + + + + + + Password + Manage your account password. + + + + + +
+
); } diff --git a/app/(admin)/dashboard/loading.tsx b/app/(admin)/dashboard/loading.tsx index dde808c..60b4108 100644 --- a/app/(admin)/dashboard/loading.tsx +++ b/app/(admin)/dashboard/loading.tsx @@ -1,9 +1,10 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function DashboardLoading() { return ( - <> +
@@ -68,6 +69,6 @@ export default function DashboardLoading() {
- + ); } diff --git a/app/(admin)/dashboard/page.tsx b/app/(admin)/dashboard/page.tsx index 7ff79c4..2c0c665 100644 --- a/app/(admin)/dashboard/page.tsx +++ b/app/(admin)/dashboard/page.tsx @@ -8,12 +8,13 @@ import { currentUser } from '@/lib/authentication'; import MiniCard from '@/components/admin/mini-card'; import RecentProject from '@/components/admin/recent-project'; import QualificationTab from '@/components/admin/qualification-tab'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function DashboardPage() { @@ -90,7 +91,7 @@ export default async function DashboardPage() { : 0; return ( - <> +

Welcome {user.name} @@ -171,6 +172,6 @@ export default async function DashboardPage() {

- +
); } diff --git a/app/(admin)/experience/loading.tsx b/app/(admin)/experience/loading.tsx index 2cf9e00..80c91ec 100644 --- a/app/(admin)/experience/loading.tsx +++ b/app/(admin)/experience/loading.tsx @@ -1,78 +1,89 @@ import { cn } from '@/lib/utils'; import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function ExperienceLoading() { return ( -
- - - - - - - - -
- {[...Array(10)].map((_, i) => ( -
-
-
- - + +
+ + + + + + + + +
+ {[...Array(10)].map((_, i) => ( +
+
+
+ + +
+
+ + +
-
- - +
+
-
- -
-
- ))} - - -
-
-
- - - - - - - - -
- {[...Array(10)].map((_, i) => ( -
-
-
- - + ))} + + +
+ + + + + + + + + + +
+ {[...Array(10)].map((_, i) => ( +
+
+
+ + +
+
+ + +
-
- - +
+
-
- -
-
- ))} - - -
-
-
-
+ ))} + + +
+ + +
+ ); } diff --git a/app/(admin)/experience/page.tsx b/app/(admin)/experience/page.tsx index 9bf0ca0..3efe462 100644 --- a/app/(admin)/experience/page.tsx +++ b/app/(admin)/experience/page.tsx @@ -3,12 +3,13 @@ import { redirect } from 'next/navigation'; import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import ExperienceForm from '@/components/admin/experience-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function ExperiencePage() { @@ -33,39 +34,41 @@ export default async function ExperiencePage() { }); return ( -
- - - - Frontend Development - - - Manage your frontend development section informations. - - - - - - - - - - Backend Development - - - Manage your backend development section informations. - - - - - - -
+ +
+ + + + Frontend Development + + + Manage your frontend development section informations. + + + + + + + + + + Backend Development + + + Manage your backend development section informations. + + + + + + +
+
); } diff --git a/app/(admin)/expertise/loading.tsx b/app/(admin)/expertise/loading.tsx index 78d8354..f399a17 100644 --- a/app/(admin)/expertise/loading.tsx +++ b/app/(admin)/expertise/loading.tsx @@ -1,109 +1,127 @@ import { cn } from '@/lib/utils'; import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function ExpertiseLoading() { return ( -
- - - - - - - - -
- {[...Array(6)].map((_, i) => ( -
-
-
- - - + +
+ + + + + + + + +
+ {[...Array(6)].map((_, i) => ( +
+
+
+ + + +
-
-
- -
-
- ))} - - -
- - - - - - - - - - -
- {[...Array(6)].map((_, i) => ( -
-
-
- - - +
+
-
- -
-
- ))} - - -
- - - - - - - - - - -
- {[...Array(5)].map((_, i) => ( -
-
-
- - - + ))} + + +
+ + + + + + + + + + +
+ {[...Array(6)].map((_, i) => ( +
+
+
+ + + +
+
+
+
-
- + ))} + + +
+ + + + + + + + + + +
+ {[...Array(5)].map((_, i) => ( +
+
+
+ + + +
+
+
+ +
-
- ))} - - -
-
-
-
+ ))} + + +
+ + +
+ ); } diff --git a/app/(admin)/expertise/page.tsx b/app/(admin)/expertise/page.tsx index 786310b..7ed76c8 100644 --- a/app/(admin)/expertise/page.tsx +++ b/app/(admin)/expertise/page.tsx @@ -3,12 +3,13 @@ import { redirect } from 'next/navigation'; import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import ExpertiseForm from '@/components/admin/expertise-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function ExpertisePage() { @@ -40,55 +41,57 @@ export default async function ExpertisePage() { }); return ( -
- - - - SEO Optimization - - - Manage your SEO optimization section informations. - - - - - - - - - - Web Development - - - Manage your web development section informations. - - - - - - - - - - Content Creation - - - Manage your content creation section informations. - - - - - - -
+ +
+ + + + SEO Optimization + + + Manage your SEO optimization section informations. + + + + + + + + + + Web Development + + + Manage your web development section informations. + + + + + + + + + + Content Creation + + + Manage your content creation section informations. + + + + + + +
+
); } diff --git a/app/(admin)/layout.tsx b/app/(admin)/layout.tsx index 933b281..cac32f7 100644 --- a/app/(admin)/layout.tsx +++ b/app/(admin)/layout.tsx @@ -3,10 +3,9 @@ import { cn } from '@/lib/utils'; import { useStore } from '@/hooks/use-store'; import { EdgeStoreProvider } from '@/lib/edgestore'; -import { Footer } from '@/components/admin-panel/footer'; -import Navbar from '@/components/admin-panel/navbar'; import Sidebar from '@/components/admin-panel/sidebar'; import ModalProvider from '@/providers/modal-provider'; +import { Footer } from '@/components/admin-panel/footer'; import { useSidebarToggle } from '@/hooks/use-sidebar-toggle'; export default function AdminLayout({ @@ -25,8 +24,7 @@ export default function AdminLayout({ sidebar?.isOpen === false ? 'lg:ml-[90px]' : 'lg:ml-72' )} > - -
{children}
+ {children}
- - - - - - - -
- {[...Array(10)].map((_, i) => ( -
- - -
- ))} -
- {[...Array(2)].map((_, i) => ( -
-
-
- - - -
-
-
- -
+ + + + + + + + + +
+ {[...Array(10)].map((_, i) => ( +
+ +
))} - -
-
- +
+ {[...Array(2)].map((_, i) => ( +
+
+
+ + + +
+
+
+ +
+
+ ))} + +
+
+ +
-
- - + + + ); } diff --git a/app/(admin)/miscellaneous/page.tsx b/app/(admin)/miscellaneous/page.tsx index 2fef590..e0f3167 100644 --- a/app/(admin)/miscellaneous/page.tsx +++ b/app/(admin)/miscellaneous/page.tsx @@ -3,12 +3,13 @@ import { redirect } from 'next/navigation'; import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import MiscellaneousForm from '@/components/admin/miscellaneous-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function MiscellaneousPage() { @@ -28,16 +29,18 @@ export default async function MiscellaneousPage() { }); return ( - - - Miscellaneous - - Manage your miscellaneous informations. - - - - - - + + + + Miscellaneous + + Manage your miscellaneous informations. + + + + + + + ); } diff --git a/app/(admin)/portfolio/[portfolioId]/edit/loading.tsx b/app/(admin)/portfolio/[portfolioId]/edit/loading.tsx index 397be0a..8908e9e 100644 --- a/app/(admin)/portfolio/[portfolioId]/edit/loading.tsx +++ b/app/(admin)/portfolio/[portfolioId]/edit/loading.tsx @@ -1,10 +1,11 @@ import { cn } from '@/lib/utils'; import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function EditPortfolioLoading() { return ( - <> + @@ -72,6 +73,6 @@ export default function EditPortfolioLoading() {
- + ); } diff --git a/app/(admin)/portfolio/[portfolioId]/edit/page.tsx b/app/(admin)/portfolio/[portfolioId]/edit/page.tsx index 403c1a3..53bc1a8 100644 --- a/app/(admin)/portfolio/[portfolioId]/edit/page.tsx +++ b/app/(admin)/portfolio/[portfolioId]/edit/page.tsx @@ -4,12 +4,13 @@ import prismadb from '@/lib/prismadb'; import BackButton from '@/components/back-button'; import { currentUser } from '@/lib/authentication'; import PortfolioForm from '@/components/admin/portfolio-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function EditPortfolioPage({ @@ -34,7 +35,7 @@ export default async function EditPortfolioPage({ }); return ( - <> + @@ -47,6 +48,6 @@ export default async function EditPortfolioPage({ - + ); } diff --git a/app/(admin)/portfolio/create/loading.tsx b/app/(admin)/portfolio/create/loading.tsx index 2970ea7..fb48a10 100644 --- a/app/(admin)/portfolio/create/loading.tsx +++ b/app/(admin)/portfolio/create/loading.tsx @@ -1,10 +1,11 @@ import { cn } from '@/lib/utils'; import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function CreatePortfolioLoading() { return ( - <> + @@ -72,6 +73,6 @@ export default function CreatePortfolioLoading() {
- + ); } diff --git a/app/(admin)/portfolio/create/page.tsx b/app/(admin)/portfolio/create/page.tsx index b578cef..0880d5b 100644 --- a/app/(admin)/portfolio/create/page.tsx +++ b/app/(admin)/portfolio/create/page.tsx @@ -1,16 +1,17 @@ import BackButton from '@/components/back-button'; import PortfolioForm from '@/components/admin/portfolio-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default function CreatePortfolioPage() { return ( - <> + @@ -23,6 +24,6 @@ export default function CreatePortfolioPage() { - + ); } diff --git a/app/(admin)/portfolio/loading.tsx b/app/(admin)/portfolio/loading.tsx index a06bfb4..0a82575 100644 --- a/app/(admin)/portfolio/loading.tsx +++ b/app/(admin)/portfolio/loading.tsx @@ -1,19 +1,26 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { DataTableLoading } from '@/components/data-table/data-table-loading'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function PortfolioLoading() { return ( - - - - - - - - - - - + + + + + + + + + + + + + ); } diff --git a/app/(admin)/portfolio/page.tsx b/app/(admin)/portfolio/page.tsx index 3471f82..24203ea 100644 --- a/app/(admin)/portfolio/page.tsx +++ b/app/(admin)/portfolio/page.tsx @@ -6,12 +6,13 @@ import { currentUser } from '@/lib/authentication'; import { DataTable } from '@/components/data-table/data-table'; import { columns } from '@/components/admin/portfolio-table/columns'; import AddButton from '@/components/admin/portfolio-table/add-button'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; const filterOptions: { @@ -40,22 +41,24 @@ export default async function PortfolioPage() { }); return ( - - - Portfolio - - Manage your projects list section informations. - - - - } - page='portfolio' - /> - - + + + + Portfolio + + Manage your projects list section informations. + + + + } + page='portfolio' + /> + + + ); } diff --git a/app/(admin)/qualification/loading.tsx b/app/(admin)/qualification/loading.tsx index eafd26c..c10204a 100644 --- a/app/(admin)/qualification/loading.tsx +++ b/app/(admin)/qualification/loading.tsx @@ -1,19 +1,22 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { DataTableLoading } from '@/components/data-table/data-table-loading'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function QualificationLoading() { return ( - - - - - - - - - - - + + + + + + + + + + + + + ); } diff --git a/app/(admin)/qualification/page.tsx b/app/(admin)/qualification/page.tsx index 604c890..2031fbd 100644 --- a/app/(admin)/qualification/page.tsx +++ b/app/(admin)/qualification/page.tsx @@ -3,14 +3,15 @@ import { redirect } from 'next/navigation'; import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import { DataTable } from '@/components/data-table/data-table'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { columns } from '@/components/admin/qualification-table/columns'; import AddButton from '@/components/admin/qualification-table/add-button'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; const filterOptions = [ @@ -41,22 +42,24 @@ export default async function QualificationPage() { }); return ( - - - Qualification - - Manage your qualification section informations. - - - - } - page='qualification' - /> - - + + + + Qualification + + Manage your qualification section informations. + + + + } + page='qualification' + /> + + + ); } diff --git a/app/(admin)/resume/loading.tsx b/app/(admin)/resume/loading.tsx index a4c2341..36e69f5 100644 --- a/app/(admin)/resume/loading.tsx +++ b/app/(admin)/resume/loading.tsx @@ -1,22 +1,25 @@ import { Skeleton } from '@/components/ui/skeleton'; import { AspectRatio } from '@/components/ui/aspect-ratio'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function ResumeLoading() { return ( - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ); } diff --git a/app/(admin)/resume/page.tsx b/app/(admin)/resume/page.tsx index 5ae432d..c774a7f 100644 --- a/app/(admin)/resume/page.tsx +++ b/app/(admin)/resume/page.tsx @@ -4,12 +4,13 @@ import prismadb from '@/lib/prismadb'; import { currentUser } from '@/lib/authentication'; import ResumeIframe from '@/components/admin/resume-iframe'; import UploadPdfButton from '@/components/admin/upload-pdf-button'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function ResumePage() { @@ -26,17 +27,19 @@ export default async function ResumePage() { }); return ( - - - - Resume - - - Manage your resume pdf file. - - - - - + + + + + Resume + + + Manage your resume pdf file. + + + + + + ); } diff --git a/app/(admin)/tool/[toolId]/edit/loading.tsx b/app/(admin)/tool/[toolId]/edit/loading.tsx index c5eda8b..2e919b3 100644 --- a/app/(admin)/tool/[toolId]/edit/loading.tsx +++ b/app/(admin)/tool/[toolId]/edit/loading.tsx @@ -1,9 +1,10 @@ import { Skeleton } from '@/components/ui/skeleton'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; export default function EditToolLoading() { return ( - <> + @@ -36,6 +37,6 @@ export default function EditToolLoading() {
- +
); } diff --git a/app/(admin)/tool/[toolId]/edit/page.tsx b/app/(admin)/tool/[toolId]/edit/page.tsx index cc1a07d..86cda99 100644 --- a/app/(admin)/tool/[toolId]/edit/page.tsx +++ b/app/(admin)/tool/[toolId]/edit/page.tsx @@ -4,12 +4,13 @@ import prismadb from '@/lib/prismadb'; import BackButton from '@/components/back-button'; import { currentUser } from '@/lib/authentication'; import ToolForm from '@/components/admin/tool-form'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; export default async function EditToolPage({ @@ -31,7 +32,7 @@ export default async function EditToolPage({ }); return ( - <> + @@ -44,6 +45,6 @@ export default async function EditToolPage({ - + ); } diff --git a/app/(admin)/tool/create/loading.tsx b/app/(admin)/tool/create/loading.tsx index 5b93de1..e99fa75 100644 --- a/app/(admin)/tool/create/loading.tsx +++ b/app/(admin)/tool/create/loading.tsx @@ -1,9 +1,10 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function CreateToolLoading() { return ( - <> + @@ -36,6 +37,6 @@ export default function CreateToolLoading() {
- + ); } diff --git a/app/(admin)/tool/create/page.tsx b/app/(admin)/tool/create/page.tsx index fcf03c6..01d7f39 100644 --- a/app/(admin)/tool/create/page.tsx +++ b/app/(admin)/tool/create/page.tsx @@ -2,15 +2,16 @@ import BackButton from '@/components/back-button'; import ToolForm from '@/components/admin/tool-form'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; export default function CreateToolPage() { return ( - <> + @@ -23,6 +24,6 @@ export default function CreateToolPage() { - + ); } diff --git a/app/(admin)/tool/loading.tsx b/app/(admin)/tool/loading.tsx index ed8c731..9c00229 100644 --- a/app/(admin)/tool/loading.tsx +++ b/app/(admin)/tool/loading.tsx @@ -1,19 +1,22 @@ import { Skeleton } from '@/components/ui/skeleton'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { DataTableLoading } from '@/components/data-table/data-table-loading'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; export default function ToolLoading() { return ( - - - - - - - - - - - + + + + + + + + + + + + + ); } diff --git a/app/(admin)/tool/page.tsx b/app/(admin)/tool/page.tsx index c013944..8045213 100644 --- a/app/(admin)/tool/page.tsx +++ b/app/(admin)/tool/page.tsx @@ -5,12 +5,13 @@ import { currentUser } from '@/lib/authentication'; import { DataTable } from '@/components/data-table/data-table'; import { columns } from '@/components/admin/tool-table/columns'; import AddButton from '@/components/admin/tool-table/add-button'; +import { ContentLayout } from '@/components/admin-panel/content-layout'; import { Card, - CardContent, - CardDescription, + CardTitle, CardHeader, - CardTitle + CardContent, + CardDescription } from '@/components/ui/card'; const filterOptions = [ @@ -41,22 +42,24 @@ export default async function ToolPage() { }); return ( - - - Tool & Apps - - Manage your tool and apps list section informations. - - - - } - page='tool' - /> - - + + + + Tool & Apps + + Manage your tool and apps list section informations. + + + + } + page='tool' + /> + + + ); } diff --git a/components/admin-panel/collapse-menu-button.tsx b/components/admin-panel/collapse-menu-button.tsx index 3ac80bc..e13f63c 100644 --- a/components/admin-panel/collapse-menu-button.tsx +++ b/components/admin-panel/collapse-menu-button.tsx @@ -31,7 +31,6 @@ type Submenu = { href: string; label: string; active: boolean; - onlyTitle?: boolean; }; interface CollapseMenuButtonProps { @@ -99,32 +98,30 @@ export function CollapseMenuButton({ - {submenus - .filter((submenu) => !submenu.onlyTitle) - .map(({ href, label, active }, index) => ( - - ))} + {submenus.map(({ href, label, active }, index) => ( + + ))} ) : ( @@ -165,15 +162,13 @@ export function CollapseMenuButton({ {label} - {submenus - .filter((submenu) => !submenu.onlyTitle) - .map(({ href, label }, index) => ( - - -

{label}

- -
- ))} + {submenus.map(({ href, label }, index) => ( + + +

{label}

+ +
+ ))} diff --git a/components/admin-panel/content-layout.tsx b/components/admin-panel/content-layout.tsx new file mode 100644 index 0000000..1419ca6 --- /dev/null +++ b/components/admin-panel/content-layout.tsx @@ -0,0 +1,15 @@ +import { Navbar } from '@/components/admin-panel/navbar'; + +interface ContentLayoutProps { + title: string; + children: React.ReactNode; +} + +export function ContentLayout({ title, children }: ContentLayoutProps) { + return ( +
+ +
{children}
+
+ ); +} diff --git a/components/admin-panel/menu.tsx b/components/admin-panel/menu.tsx index cfe15bd..47ef451 100644 --- a/components/admin-panel/menu.tsx +++ b/components/admin-panel/menu.tsx @@ -5,7 +5,7 @@ import { usePathname } from 'next/navigation'; import { Ellipsis, LogOut } from 'lucide-react'; import { cn } from '@/lib/utils'; -import { getPages } from '@/lib/pages'; +import { getMenuList } from '@/lib/menu-list'; import { Button } from '@/components/ui/button'; import { ScrollArea } from '@/components/ui/scroll-area'; import { CollapseMenuButton } from '@/components/admin-panel/collapse-menu-button'; @@ -22,13 +22,13 @@ interface MenuProps { export function Menu({ isOpen }: MenuProps) { const pathname = usePathname(); - const pages = getPages(pathname); + const menuList = getMenuList(pathname); return (