Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion frontend/src/components/shared/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<nav v-if="showNavigationBar" class="md:flex md:justify-between md:items-center md:py-5">
<div class="flex items-center justify-between px-5 py-3 md:p-0 w-full">
<div id="logo">
<router-link to="/">
<router-link v-bind:to="getMatchaButtonRoute">
<div class="flex justify-center items-center">
<img src="../../assets/logo.png" class="h-6">
<h1 v-if="!loggedIn" class="text-purple-matcha text-xl ml-2">Matcha</h1>
Expand Down Expand Up @@ -88,6 +88,12 @@ export default {
showNavigationBar() {
return this.dontShowOn.indexOf(this.route) === -1;
},
getMatchaButtonRoute() {
if (!this.loggedIn) {
return '/';
}
return '/browse';
},
},
beforeMount() {
this.route = this.$router.currentRoute.name;
Expand Down