Vue3: migrating from vuex to Pinia (#249)
* Vue3: migrating from vuex to Pinia * toggle input fixes * update configureCompat --------- Co-authored-by: Forms Dev <chirag+new@notionforms.io>
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
<template />
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { computed } from 'vue'
|
||||
import { useAuthStore } from '../../stores/auth'
|
||||
|
||||
export default {
|
||||
|
||||
name: 'Amplitude',
|
||||
|
||||
setup () {
|
||||
const authStore = useAuthStore()
|
||||
return {
|
||||
authStore,
|
||||
authenticated : computed(() => authStore.check),
|
||||
user : computed(() => authStore.user)
|
||||
}
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
loaded: false,
|
||||
@@ -14,12 +23,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters({
|
||||
authenticated: 'auth/check',
|
||||
user: 'auth/user'
|
||||
})
|
||||
},
|
||||
computed: {},
|
||||
|
||||
watch: {
|
||||
$route () {
|
||||
|
||||
Reference in New Issue
Block a user