|
@@ -1,5 +1,11 @@
|
|
|
import { createNuxtPersistedState } from 'pinia-plugin-persistedstate/nuxt'
|
|
|
|
|
|
export default defineNuxtPlugin(nuxtApp => {
|
|
|
- nuxtApp.$pinia.use(createNuxtPersistedState(useCookie))
|
|
|
+ const maxAge = 365*24*60*60;
|
|
|
+ const expires = new Date(Date.now() + 1000*maxAge);
|
|
|
+ nuxtApp.$pinia.use(createNuxtPersistedState(useCookie, {
|
|
|
+ cookieOptions: {
|
|
|
+ expires, maxAge
|
|
|
+ }
|
|
|
+ }))
|
|
|
})
|