feat(marketing): Refactor marketing wizard steps and add data collection methods
- Moved all marketing wizard step components to `create/_components` directory - Added `collectData` static method to each step component for data retrieval - Reorganized file structure to improve component modularity - Prepared steps for dynamic data collection in wizard workflow - Added VSCode settings file for project configuration - Introduced new CMS-related components and services - Updated API endpoints and added new query hooks
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import api from "../axios";
|
||||
import { API_ENDPOINTS } from "../endpoints";
|
||||
import { ApiResponse } from "../types";
|
||||
import { TCmsResponse } from "../types/TCms";
|
||||
|
||||
export const cmsService = {
|
||||
getCms: async (): Promise<ApiResponse<TCmsResponse>> => {
|
||||
try {
|
||||
return (await api.get(API_ENDPOINTS.CMS.BASE())).data;
|
||||
} catch (error) {
|
||||
console.error("Error Caught in CMS Service => Get cms", error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
createCms: async (data: any) => {
|
||||
try {
|
||||
return (await api.post(API_ENDPOINTS.CMS.BASE(), data)).data;
|
||||
} catch (error) {
|
||||
console.error("Error Caught in CMS Service => Create cms", error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user