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:
@@ -28,7 +28,7 @@ const CmsTable = () => {
|
||||
columns={columns}
|
||||
emptyMessage="No Cms were found"
|
||||
>
|
||||
Hollo
|
||||
Cms list will be added
|
||||
</EmptyListWrapper>
|
||||
</TableBody>
|
||||
</Table>
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
"use client";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import EmptyListWrapper from "@/components/HOC/EmptyListWrapper";
|
||||
import { Table, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
||||
import TableSkeleton from "@/components/ui/TableSkeleton";
|
||||
import { useContactUsListPresenter } from "./useContactUsListPresenter";
|
||||
|
||||
const ContactUsTable = () => {
|
||||
const { columns, pathname, router, isPending } = useContactUsListPresenter();
|
||||
const { columns, pathname, router, isPending, data } =
|
||||
useContactUsListPresenter();
|
||||
return (
|
||||
<div className="flex flex-col rounded-[10px] bg-white px-7.5 pb-4 pt-7.5 shadow-1 dark:bg-gray-dark dark:shadow-card">
|
||||
<Table>
|
||||
@@ -28,7 +24,13 @@ const ContactUsTable = () => {
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
{isPending && <TableSkeleton column={columns.length} />}
|
||||
<TableBody></TableBody>
|
||||
<EmptyListWrapper
|
||||
list={data ?? []}
|
||||
columns={columns}
|
||||
emptyMessage="No contact us is submitted"
|
||||
>
|
||||
Contact us table will be initialized here
|
||||
</EmptyListWrapper>
|
||||
</Table>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { useReadAllContactUs } from "@/hooks/queries/useContactUsQuery";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
export const useContactUsListPresenter = () => {
|
||||
const columns: string[] = [];
|
||||
const columns: string[] = ["row", "actions"];
|
||||
const pathname = usePathname();
|
||||
const router = useRouter();
|
||||
const { data, isPending } = useReadAllContactUs();
|
||||
|
||||
Reference in New Issue
Block a user