first commit
This commit is contained in:
18
app/stores/banner.ts
Normal file
18
app/stores/banner.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import type { Banner } from '~~/types/banner';
|
||||
|
||||
interface BannerState {
|
||||
banner: Banner[];
|
||||
}
|
||||
|
||||
export const useBannerStore = defineStore('banner', {
|
||||
state: (): BannerState => ({
|
||||
banner: [],
|
||||
}),
|
||||
actions: {
|
||||
setBanner(newBanner: Banner[]): void {
|
||||
this.banner = newBanner;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user