From 6f35381eeaf87bb567f2a070b493ff9b9303c7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Tue, 18 Feb 2025 11:26:29 +0100 Subject: [PATCH] Update usage of defineStore for Pinia 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref: https://pinia.vuejs.org/cookbook/migration-v2-v3.html#defineStore-id- Signed-off-by: Aurélien Bompard --- frontend/src/stores/toast.ts | 3 +-- frontend/src/stores/user.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/stores/toast.ts b/frontend/src/stores/toast.ts index e63fc7f58..7680fded8 100644 --- a/frontend/src/stores/toast.ts +++ b/frontend/src/stores/toast.ts @@ -12,8 +12,7 @@ export interface Toast { date: Date; } -export const useToastStore = defineStore({ - id: "toast", +export const useToastStore = defineStore("toast", { state: () => ({ toasts: [] as Toast[], }), diff --git a/frontend/src/stores/user.ts b/frontend/src/stores/user.ts index 50d5ea8a2..c9dc0bcc8 100644 --- a/frontend/src/stores/user.ts +++ b/frontend/src/stores/user.ts @@ -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,