Initial commit: Tapalka monorepo (bot, front, strapi)
This commit is contained in:
23
CMyTapper/robucks-front/store/modal.state.ts
Normal file
23
CMyTapper/robucks-front/store/modal.state.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface IUseModal {
|
||||
isDecimal: boolean;
|
||||
shopItemId: number | null;
|
||||
priceItem: number;
|
||||
image: string;
|
||||
setIsDecimal: (isDecimal: boolean) => void;
|
||||
setPriceItem: (priceItem: number) => void;
|
||||
setImage: (image: string) => void;
|
||||
setShopItemId: (shopItemId: number | null) => void;
|
||||
}
|
||||
|
||||
export const useModalStore = create<IUseModal>((set) => ({
|
||||
isDecimal: true,
|
||||
priceItem: 0,
|
||||
shopItemId: null,
|
||||
image: '/icons/small-coin-icon.svg',
|
||||
setShopItemId: (shopItemId) => set(() => ({ shopItemId })),
|
||||
setIsDecimal: (isDecimal) => set(() => ({ isDecimal })),
|
||||
setPriceItem: (priceItem) => set(() => ({ priceItem })),
|
||||
setImage: (image) => set(() => ({ image })),
|
||||
}));
|
||||
Reference in New Issue
Block a user