2023-05-28 17:16:19 +00:00
|
|
|
import { createPinia } from 'pinia'
|
|
|
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
|
|
|
import type { App } from 'vue'
|
|
|
|
|
|
|
|
import { useKUNGalgamerStore } from '@/store/modules/kungalgamer'
|
2023-04-20 15:34:48 +00:00
|
|
|
|
|
|
|
const store = createPinia()
|
|
|
|
|
2023-05-28 17:16:19 +00:00
|
|
|
export function setupPinia(app: App<Element>) {
|
|
|
|
store.use(piniaPluginPersistedstate)
|
|
|
|
app.use(store)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function storeReset() {
|
|
|
|
const userStore = useKUNGalgamerStore()
|
|
|
|
userStore.$reset()
|
|
|
|
}
|
|
|
|
|
|
|
|
export { store }
|