Skip to content

Commit be7e865

Browse files
committed
navigation buttons only if logged in and profile completed
1 parent 0a48089 commit be7e865

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

frontend/src/components/shared/NavBar.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</div>
1212
</router-link>
1313
</div>
14-
<NavBarBell v-if="loggedIn"></NavBarBell>
14+
<NavBarBell v-if="loggedIn && profileCompleted"></NavBarBell>
1515
<div id="burger" class="md:hidden">
1616
<button type="button" class="block text-gray-800 focus:outline-none" v-on:click="isOpen = !isOpen">
1717
<svg class="w-8 h-8 text-purple-matcha fill-current" viewBox="0 0 24 24">
@@ -26,11 +26,11 @@
2626
<router-link to="/accounts/signin" class="navigation-button-logged-in md:hover:bg-white-matcha md:hover:text-purple-matcha md:text-purple-matcha md:bg-white-matcha md:py-2 md:px-8 md:rounded-md mx-0">Sign In</router-link>
2727
<router-link to="/accounts/signup" class="navigation-button-logged-in md:hover:bg-purple-matcha md:hover:text-white-matcha md:text-white-matcha md:py-2 md:px-8">Get Started</router-link>
2828
</div>
29-
<router-link v-if="loggedIn" to="/browse" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Browse'}">Browse</router-link>
30-
<router-link v-if="loggedIn" to="/search" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Search'}">Search</router-link>
31-
<router-link v-if="loggedIn" to="/matches" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Matches'}">Matches</router-link>
32-
<router-link v-if="loggedIn" to="/settings" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Settings'}">Settings</router-link>
33-
<router-link v-if="loggedIn" to="/history" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'History'}">History</router-link>
29+
<router-link v-if="loggedIn && profileCompleted" to="/browse" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Browse'}">Browse</router-link>
30+
<router-link v-if="loggedIn && profileCompleted" to="/search" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Search'}">Search</router-link>
31+
<router-link v-if="loggedIn && profileCompleted" to="/matches" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Matches'}">Matches</router-link>
32+
<router-link v-if="loggedIn && profileCompleted" to="/settings" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Settings'}">Settings</router-link>
33+
<router-link v-if="loggedIn && profileCompleted" to="/history" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'History'}">History</router-link>
3434
<router-link v-if="loggedIn" to="/accounts/signout" class="navigation-button-logged-in">Exit</router-link>
3535
</div>
3636
</nav>
@@ -79,6 +79,9 @@ export default {
7979
loggedIn() {
8080
return this.$store.getters.getLoggedInUser;
8181
},
82+
profileCompleted() {
83+
return this.$store.getters.getLoggedInUser.is_profile_completed;
84+
},
8285
currentRoute() {
8386
return this.route;
8487
},

0 commit comments

Comments
 (0)