File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1111 @apply text-purple-matcha;
1212 @apply rounded-md;
1313 }
14+
15+ .navigation-button-logged-in : active , .navigation-button-logged-in : focus {
16+ outline : none;
17+ }
18+
1419 .navigation-button-logged-in : hover {
1520 @apply bg-purple-matcha;
1621 @apply text-white-matcha;
Original file line number Diff line number Diff line change 2121 </div >
2222 </div >
2323 <div id =" links" v-on:click =" isOpen = !isOpen" v-bind:class =" isOpen ? 'block' : 'hidden'" class =" px-2 pb-5 text-center sm:p-0 sm:block sm:flex sm:items-center" >
24- <div class =" sm:flex sm:bg-purple-matcha sm:border-2 sm:border-purple-matcha sm:rounded-lg" >
25- <router-link v-if = " !loggedIn " to =" /accounts/signin" class =" navigation-button-logged-in sm:hover:bg-white-matcha sm:hover:text-purple-matcha sm:text-purple-matcha sm:bg-white-matcha sm:py-2 sm:px-8 sm:rounded-md" >Sign In</router-link >
26- <router-link v-if = " !loggedIn " to =" /accounts/signup" class =" navigation-button-logged-in sm:hover:bg-purple-matcha sm:hover:text-white-matcha sm:text-white-matcha sm:py-2 sm:px-8" >Get Started</router-link >
24+ <div v-if = " !loggedIn " class =" sm:flex sm:bg-purple-matcha sm:border-2 sm:border-purple-matcha sm:rounded-lg" >
25+ <router-link to =" /accounts/signin" class =" navigation-button-logged-in sm:hover:bg-white-matcha sm:hover:text-purple-matcha sm:text-purple-matcha sm:bg-white-matcha sm:py-2 sm:px-8 sm:rounded-md" >Sign In</router-link >
26+ <router-link to =" /accounts/signup" class =" navigation-button-logged-in sm:hover:bg-purple-matcha sm:hover:text-white-matcha sm:text-white-matcha sm:py-2 sm:px-8" >Get Started</router-link >
2727 </div >
28+ <router-link v-if =" loggedIn" to =" /browse" class =" navigation-button-logged-in" >Browse</router-link >
2829 <router-link v-if =" loggedIn" to =" /search" class =" navigation-button-logged-in" >Search</router-link >
29- <router-link v-if =" loggedIn" to =" /add" class =" navigation-button-logged-in" >Add</router-link >
30+ <router-link v-if =" loggedIn" to =" /" class =" navigation-button-logged-in" >Matches</router-link >
31+ <router-link v-if =" loggedIn" to =" /" class =" navigation-button-logged-in" >Profile</router-link >
3032 <router-link v-if =" loggedIn" v-on:click.native =" logout()" to =" /" class =" navigation-button-logged-in" >Log Out</router-link >
3133 </div >
3234 </nav >
3335</template >
3436
3537<script >
36-
3738/* eslint-disable indent */
39+ import { logOut } from ' @/auth/logOut' ;
40+
3841export default {
3942 name: ' Navigation' ,
4043 data () {
@@ -44,12 +47,12 @@ export default {
4447 },
4548 computed: {
4649 loggedIn () {
47- return false ;
50+ return this . $store . getters . getLoggedInUser ;
4851 },
4952 },
5053 methods: {
5154 async logout () {
52- return true ;
55+ await logOut () ;
5356 },
5457 },
5558};
You can’t perform that action at this time.
0 commit comments