Skip to content

Commit 321f571

Browse files
committed
exclude navbar from specific routes
1 parent 37be75e commit 321f571

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

frontend/src/components/shared/NavBar.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<!-- eslint-disable max-len -->
33
<!-- eslint-disable vue/no-deprecated-v-on-native-modifier -->
4-
<nav class="md:flex md:justify-between md:items-center md:py-5">
4+
<nav v-if="showNavigationBar" class="md:flex md:justify-between md:items-center md:py-5">
55
<div class="flex items-center justify-between px-5 py-3 md:p-0 w-full">
66
<div id="logo">
77
<router-link to="/">
@@ -50,6 +50,17 @@ export default {
5050
return {
5151
isOpen: false,
5252
route: null,
53+
dontShowOn: [
54+
'SignUp',
55+
'SignIn',
56+
'ForgotPassword',
57+
'ResetPassword',
58+
'ResetPasswordError',
59+
'AccountVerified',
60+
'AccountVerifiedError',
61+
'Onboarding',
62+
'SignOut',
63+
],
5364
};
5465
},
5566
methods: {
@@ -71,6 +82,9 @@ export default {
7182
currentRoute() {
7283
return this.route;
7384
},
85+
showNavigationBar() {
86+
return this.dontShowOn.indexOf(this.route) === -1;
87+
},
7488
},
7589
beforeMount() {
7690
this.route = this.$router.currentRoute.name;

frontend/src/components/shared/NavBarBell.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ export default {
7171
methods: {
7272
async linkTo(type, link) {
7373
await this.toggle();
74-
console.log(type);
75-
console.log(this.$route.path);
7674
if (type === 'match' || type === 'message' || type === 'message_like') {
7775
if (this.$route.path !== '/matches') {
7876
await this.$router.push('/matches');

frontend/src/router/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ const routes = [
141141
{
142142
path: '/accounts/signout',
143143
component: SignOut,
144+
name: 'SignOut',
144145
beforeEnter: notLoggedInRedirectLogin,
145146
},
146147
];

0 commit comments

Comments
 (0)