mirror of
https://github.com/maciejpedzich/racemash.git
synced 2024-11-27 16:15:47 +01:00
Remove references to unused auth module code
This commit is contained in:
parent
79baa75a53
commit
053e4e0302
@ -1,19 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { useAuth } from '@/composables/useAuth';
|
||||
import ThemeSwitch from './ThemeSwitch.vue';
|
||||
|
||||
const { isLoggedIn, logOut } = useAuth();
|
||||
const router = useRouter();
|
||||
|
||||
const showDrawer = ref(false);
|
||||
|
||||
const logOutAndGoToLogIn = async () => {
|
||||
await logOut();
|
||||
await router.push('/log-in');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -28,22 +18,7 @@ const logOutAndGoToLogIn = async () => {
|
||||
<v-navigation-drawer v-model="showDrawer" temporary>
|
||||
<v-list density="compact" nav>
|
||||
<v-list-item title="Home" prepend-icon="mdi-home" link to="/" />
|
||||
<template v-if="isLoggedIn">
|
||||
<v-list-item title="Vote" prepend-icon="mdi-vote" link to="/vote" />
|
||||
<v-list-item
|
||||
title="Log out"
|
||||
prepend-icon="mdi-logout"
|
||||
@click="logOutAndGoToLogIn"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-list-item
|
||||
title="Log in"
|
||||
prepend-icon="mdi-login"
|
||||
link
|
||||
to="/log-in"
|
||||
/>
|
||||
</template>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
|
@ -8,11 +8,6 @@ const routes = [
|
||||
name: 'Home',
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/log-in',
|
||||
name: 'LogIn',
|
||||
component: () => import('../views/LogIn.vue')
|
||||
},
|
||||
{
|
||||
path: '/vote',
|
||||
name: 'Vote',
|
||||
|
@ -1,7 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { useVote } from '@/composables/useVote';
|
||||
|
||||
const { photosInCurrentVote } = useVote();
|
||||
const { photosInCurrentVote, pickPhotosForNewVote } = useVote();
|
||||
|
||||
onMounted(pickPhotosForNewVote);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Loading…
Reference in New Issue
Block a user