designtopack/src/stores/user.js

13 lines
281 B
JavaScript
Raw Normal View History

2024-09-10 12:09:53 +02:00
import { defineStore } from "pinia";
2024-10-30 10:56:11 +01:00
import { ref, computed } from "vue";
2024-09-10 12:09:53 +02:00
export const useUserStore = defineStore("user", () => {
const user = ref(null);
2024-10-30 10:56:11 +01:00
const notifications = computed(() => {
return user.value.notifications;
});
return { user, notifications };
2024-09-10 12:09:53 +02:00
});