17 lines
399 B
TypeScript
17 lines
399 B
TypeScript
import { defineStore } from 'pinia';
|
|
import type { Setting } from '~~/types/setting';
|
|
|
|
interface SettingState {
|
|
settings: Setting | null;
|
|
}
|
|
|
|
export const useSettingStore = defineStore('setting', {
|
|
state: (): SettingState => ({
|
|
settings: null,
|
|
}),
|
|
actions: {
|
|
setSettings(newSettings: Setting | null): void {
|
|
this.settings = newSettings;
|
|
}
|
|
}
|
|
}); |