😂🔫
This commit is contained in:
16
src/stores/assets.ts
Normal file
16
src/stores/assets.ts
Normal 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)
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user