Skip to content

Instantly share code, notes, and snippets.

Created Oct 26, 2020
What would you like to do?
This is the base nav file for all Vue files or components we will be creating.
<div class="container">
<div class="row">
<div class="six columns">
<a href="/" class="application-title"><i class="material-icons">sms</i> Ld-Talk</a>
<div class="six columns">
<ul v-if="!isLoggedIn">
<li><router-link :to="{ name: 'Welcome' }"><i class="material-icons">lock_open</i> Login</router-link></li>
<li><a href=""><i class="material-icons">local_cafe</i> Buy Me Coffee</a></li>
<ul v-else>
<li><router-link :to="{ name: 'Welcome' }"><i class="material-icons">home</i> Home</router-link></li>
<li><a href=""><i class="material-icons">lock_open</i> Logout</a></li>
<li><a href=""><i class="material-icons">local_cafe</i> Buy Me Coffee</a></li>
<script type="text/javascript">
import axios from 'axios';
export default {
data() {
return {
isLoggedIn: false
created() {
let userSecret = localStorage.getItem('access-token');
if (userSecret.trim() !== '') {
this.isLoggedIn = true;
this.isLoggedIn = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment