Update types
This commit is contained in:
@@ -7,37 +7,39 @@ import type { GetArticleResponse } from "~/composables/api/blog/useGetArticle";
|
||||
// types
|
||||
|
||||
export type GetHomeDataResponse = {
|
||||
"sliders": {
|
||||
"id": number,
|
||||
"link": string,
|
||||
"title": string,
|
||||
"description": string,
|
||||
"image": string | null,
|
||||
"video": string | null
|
||||
}[],
|
||||
"main_categories": Category[],
|
||||
"products": ProductListItem[],
|
||||
"difreance_section": {
|
||||
"image1": string,
|
||||
"image2": string,
|
||||
"title1": string,
|
||||
"title2": string,
|
||||
"description1": string,
|
||||
"description2": string,
|
||||
"link1": string,
|
||||
"link2": string
|
||||
},
|
||||
"show_case_slider" : {
|
||||
"id": number,
|
||||
"title": string,
|
||||
"description": string,
|
||||
"link": string,
|
||||
"image": string,
|
||||
}[]
|
||||
sliders: {
|
||||
id: number;
|
||||
link: string;
|
||||
title: string;
|
||||
description: string;
|
||||
image: string | null;
|
||||
video: string | null;
|
||||
}[];
|
||||
main_categories: Category[];
|
||||
products: ProductListItem[];
|
||||
difreance_section: {
|
||||
image1: string;
|
||||
image2: string;
|
||||
title1: string;
|
||||
title2: string;
|
||||
description1: string;
|
||||
description2: string;
|
||||
link1: string;
|
||||
link2: string;
|
||||
};
|
||||
show_case_slider: {
|
||||
id: number;
|
||||
title: string;
|
||||
description: string;
|
||||
link: string;
|
||||
image1: string;
|
||||
image2: string;
|
||||
image3: string;
|
||||
background_image: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
const useHomeData = () => {
|
||||
|
||||
// state
|
||||
|
||||
const { $axios: axios } = useNuxtApp();
|
||||
@@ -51,7 +53,7 @@ const useHomeData = () => {
|
||||
|
||||
return useQuery({
|
||||
queryKey: [QUERY_KEYS.home],
|
||||
queryFn: () => handleHomeData()
|
||||
queryFn: () => handleHomeData(),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user