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:
AmirReza Jamali
2025-11-10 09:53:22 +03:30
parent ed18d86960
commit 5640febf40
7 changed files with 210 additions and 155 deletions
+10 -2
View File
@@ -1,10 +1,10 @@
import api from "../axios";
import { API_ENDPOINTS } from "../endpoints";
import { ApiResponse } from "../types";
import { TCmsResponse } from "../types/TCms";
import { TCmsListResponse } from "../types/TCms";
export const cmsService = {
getCms: async (): Promise<ApiResponse<TCmsResponse>> => {
getCms: async (): Promise<ApiResponse<TCmsListResponse>> => {
try {
return (await api.get(API_ENDPOINTS.CMS.BASE())).data;
} catch (error) {
@@ -20,4 +20,12 @@ export const cmsService = {
throw error;
}
},
getCmsDetails: async (id: string) => {
try {
return (await api.get(API_ENDPOINTS.CMS.BASE(id))).data;
} catch (error) {
console.error("Error Caught In CMS Service => getCmsDetails: ", error);
throw error;
}
},
};