complated
This commit is contained in:
15
screens/home/lib/hook.ts
Normal file
15
screens/home/lib/hook.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
type HomeStore = {
|
||||
showFilter: boolean;
|
||||
setShowFilter: (value: boolean) => void;
|
||||
step: 'filter' | 'items';
|
||||
setStep: (value: 'filter' | 'items') => void;
|
||||
}
|
||||
|
||||
export const useHomeStore = create<HomeStore>((set) => ({
|
||||
showFilter: false,
|
||||
setShowFilter: (value: boolean) => set({ showFilter: value }),
|
||||
step: 'filter',
|
||||
setStep: (value: 'filter' | 'items') => set({ step: value }),
|
||||
}))
|
||||
@@ -22,7 +22,7 @@ export interface ProductResponse {
|
||||
id: number;
|
||||
file: string;
|
||||
}[];
|
||||
category: { id: number; name: string; icon: string }[];
|
||||
category: { id: number; name: string; icon_name: string | null }[];
|
||||
}
|
||||
|
||||
export interface CompanyBody {
|
||||
@@ -42,7 +42,7 @@ export interface CompanyBody {
|
||||
|
||||
export interface CompanyResponse {
|
||||
id: number;
|
||||
company_name: string;
|
||||
company_name: string | null;
|
||||
country_name: string;
|
||||
region_name: string;
|
||||
district_name: string;
|
||||
@@ -99,6 +99,7 @@ export interface States {
|
||||
districts: { id: number; name: string; code: string }[];
|
||||
}[];
|
||||
code: string;
|
||||
flag: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user