mirror of
https://github.com/maciejpedzich/racemash.git
synced 2024-11-10 00:53:03 +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>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
import { useAuth } from '@/composables/useAuth';
|
|
||||||
import ThemeSwitch from './ThemeSwitch.vue';
|
import ThemeSwitch from './ThemeSwitch.vue';
|
||||||
|
|
||||||
const { isLoggedIn, logOut } = useAuth();
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
const showDrawer = ref(false);
|
const showDrawer = ref(false);
|
||||||
|
|
||||||
const logOutAndGoToLogIn = async () => {
|
|
||||||
await logOut();
|
|
||||||
await router.push('/log-in');
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -28,22 +18,7 @@ const logOutAndGoToLogIn = async () => {
|
|||||||
<v-navigation-drawer v-model="showDrawer" temporary>
|
<v-navigation-drawer v-model="showDrawer" temporary>
|
||||||
<v-list density="compact" nav>
|
<v-list density="compact" nav>
|
||||||
<v-list-item title="Home" prepend-icon="mdi-home" link to="/" />
|
<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="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-list>
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -8,11 +8,6 @@ const routes = [
|
|||||||
name: 'Home',
|
name: 'Home',
|
||||||
component: Home
|
component: Home
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/log-in',
|
|
||||||
name: 'LogIn',
|
|
||||||
component: () => import('../views/LogIn.vue')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/vote',
|
path: '/vote',
|
||||||
name: 'Vote',
|
name: 'Vote',
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { onMounted } from 'vue';
|
||||||
import { useVote } from '@/composables/useVote';
|
import { useVote } from '@/composables/useVote';
|
||||||
|
|
||||||
const { photosInCurrentVote } = useVote();
|
const { photosInCurrentVote, pickPhotosForNewVote } = useVote();
|
||||||
|
|
||||||
|
onMounted(pickPhotosForNewVote);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
Reference in New Issue
Block a user