Files
nuxtfiber/app/stores/productTree.ts
Beyhan Oğur 7b2b27a42c first commit
2026-04-26 22:18:17 +03:00

18 lines
433 B
TypeScript

import { defineStore } from 'pinia';
import type { ProductTree } from '~~/types/banner';
interface ProductTreeState {
productTree: ProductTree[];
}
export const useProductTreeStore = defineStore('productTree', {
state: (): ProductTreeState => ({
productTree: [],
}),
actions: {
setProductTree(newProductTree: ProductTree[]): void {
this.productTree = newProductTree;
}
}
});