Skip to content

Commit

Permalink
Only persist user
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jul 16, 2024
1 parent 54a9c80 commit 5079d47
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import type { LoginForm } from './loginForm'
import type { UserInterface } from './userInterface'
import { type AlertInterface, AlertStyle } from './alerts'

export { type LoginForm, type UserInterface, type AlertInterface, AlertStyle }
export { type LoginForm, type UserInterface, type AlertInterface, AlertStyle }
5 changes: 4 additions & 1 deletion app/assets/stores/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import type { UserInterface, LoginForm, AlertInterface } from '../interfaces'
import { AlertStyle } from '../interfaces'

export const useAuthStore = defineStore('auth', {
persist: true,
persist: {
// Only persist user
paths: ['user']
},
state: () => {
return {
user: null as UserInterface | null,
Expand Down
Loading

0 comments on commit 5079d47

Please sign in to comment.