An error occurred while loading the file. Please try again.
  • Patrick Ade's avatar
    Implement authentication store using Pinia; create auth store with login,... · e6e9197f
    Patrick Ade authored
    Implement authentication store using Pinia; create auth store with login, logout, and user fetching functionalities.
    
    Update main entry point to reflect new store structure; change import path for auth store.
    
    Add TypeScript support for Vue components; create shims-vue.d.ts for .vue file declarations.
    
    Create Login and Register views with authentication logic; implement user login and registration forms with error handling.
    
    Refactor HomeView to utilize authentication store; display user information and logout functionality based on authentication state.
    e6e9197f
counter.ts 320 bytes
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
    const count = ref(0)
    const doubleCount = computed(() => count.value * 2)
    function increment() {
        count.value++
    return { count, doubleCount, increment }