1
0

feat: use store getters to check auth (#731)

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/731
Reviewed-by: konrad <k@knt.li>
Co-authored-by: dpschen <dpschen@noreply.kolaente.de>
Co-committed-by: dpschen <dpschen@noreply.kolaente.de>
This commit is contained in:
dpschen
2021-09-10 13:04:00 +00:00
committed by konrad
parent b5df941e39
commit 0295113f50
4 changed files with 29 additions and 15 deletions

View File

@ -33,8 +33,7 @@
</template>
<script>
import {mapState} from 'vuex'
import authTypes from '@/models/authTypes.json'
import {mapGetters} from 'vuex'
export default {
name: 'LinkSharingAuth',
@ -54,9 +53,9 @@ export default {
mounted() {
this.setTitle(this.$t('sharing.authenticating'))
},
computed: mapState({
authLinkShare: state => state.auth.authenticated && (state.auth.info && state.auth.info.type === authTypes.LINK_SHARE),
}),
computed: mapGetters('auth', [
'authLinkShare',
]),
methods: {
auth() {
this.errorMessage = ''