feat(cms): Add CMS details page and update related components
- Implement new edit marketing page with dynamic routing - Update CMS and contact us table components with placeholder content - Add new query hook for fetching CMS details by ID - Modify CMS service to support fetching individual CMS details - Update type definitions for CMS-related data structures - Add initial breadcrumb navigation for edit marketing page - Prepare infrastructure for future CMS editing functionality
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import Loading from "@/app/loading";
|
||||
import Breadcrumb from "@/components/Breadcrumbs/Breadcrumb";
|
||||
import { useGetCmsDetails } from "@/hooks/queries/useCmsQueries";
|
||||
import { BreadcrumbItem } from "@/types/shared";
|
||||
import { use } from "react";
|
||||
|
||||
interface IProps {
|
||||
params: Promise<{ id: string }>;
|
||||
}
|
||||
const EditMarketingPage = async ({ params }: IProps) => {
|
||||
const { id } = use(params);
|
||||
const { data, isPending } = useGetCmsDetails(id);
|
||||
const breadcrumbItems: BreadcrumbItem[] = [
|
||||
{
|
||||
href: "/",
|
||||
name: "Dashboard",
|
||||
},
|
||||
{
|
||||
href: "/marketing",
|
||||
name: "Marketing",
|
||||
},
|
||||
{
|
||||
href: `/marketing/${id}`,
|
||||
name: "Edit Marketing",
|
||||
},
|
||||
];
|
||||
if (isPending) return <Loading />;
|
||||
return (
|
||||
<>
|
||||
<Breadcrumb items={breadcrumbItems} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user