This commit is contained in:
2024-06-30 23:27:06 +02:00
parent 37460a9497
commit f0c5c81e86
5 changed files with 102 additions and 59 deletions

16
src/stores/assets.ts Normal file
View File

@ -0,0 +1,16 @@
import { defineStore } from 'pinia'
import { type Asset } from '@/types'
export const useAssetStore = defineStore('assets', {
state: () => ({
assets: [] as Asset[]
}),
actions: {
setAssets(assets: Asset[]) {
this.assets = assets
},
addAsset(asset: Asset) {
this.assets.push(asset)
}
}
})