Files
Tapalka/CMyTapper/robucks-front/store/shopItems.state.ts

14 lines
366 B
TypeScript

import { create } from 'zustand';
import { ITask } from '@/api/tasks.api';
import { IShopItem } from '@/api/shop-item.api';
interface IUseTasks {
shopItems: IShopItem[];
setShopItems(tasks: IShopItem[]): void;
}
export const useShopItemsStore = create<IUseTasks>(set => ({
shopItems: [],
setShopItems: shopItems => set(() => ({ shopItems })),
}));