Skip to content

Commit

Permalink
Update usage of defineStore for Pinia 3
Browse files Browse the repository at this point in the history
  • Loading branch information
abompard committed Feb 18, 2025
1 parent 0d25fa4 commit 6f35381
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions frontend/src/stores/toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export interface Toast {
date: Date;
}

export const useToastStore = defineStore({
id: "toast",
export const useToastStore = defineStore("toast", {
state: () => ({
toasts: [] as Toast[],
}),
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/stores/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { login } from "../auth";
import type { UserInfoResponseJson } from "../auth/userinfo_request";
import { useToastStore } from "./toast";

export const useUserStore = defineStore({
id: "user",
export const useUserStore = defineStore("user", {
state: () => ({
accessToken: null as string | null,
refreshToken: null as string | null,
Expand Down

0 comments on commit 6f35381

Please sign in to comment.