Skip to content

Commit 3b24358

Browse files
authored
fix: type use of defineStore in @/stores (AstrBotDevs#7490)
1 parent 2a229c4 commit 3b24358

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

dashboard/src/stores/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { defineStore } from 'pinia';
22
import { router } from '@/router';
33
import axios from 'axios';
44

5-
export const useAuthStore = defineStore({
6-
id: 'auth',
5+
export const useAuthStore = defineStore("auth", {
76
state: () => ({
87
// @ts-ignore
98
username: '',

dashboard/src/stores/common.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { defineStore } from 'pinia';
22
import axios from 'axios';
33

4-
export const useCommonStore = defineStore({
5-
id: 'common',
4+
export const useCommonStore = defineStore("common", {
65
state: () => ({
76
// @ts-ignore
87
eventSource: null,

dashboard/src/stores/customizer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { defineStore } from 'pinia';
22
import config from '@/config';
33

4-
export const useCustomizerStore = defineStore({
5-
id: 'customizer',
4+
export const useCustomizerStore = defineStore("customizer", {
65
state: () => ({
76
Sidebar_drawer: config.Sidebar_drawer,
87
Customizer_drawer: config.Customizer_drawer,

dashboard/src/stores/personaStore.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ export interface ReorderItem {
4343
sort_order: number;
4444
}
4545

46-
export const usePersonaStore = defineStore({
47-
id: 'persona',
46+
export const usePersonaStore = defineStore("persona", {
4847
state: () => ({
4948
folderTree: [] as FolderTreeNode[],
5049
currentFolderId: null as string | null,

0 commit comments

Comments
 (0)