Skip to content

Instantly share code, notes, and snippets.

@fhsinchy
Created June 24, 2021 11:32
Show Gist options
  • Save fhsinchy/c32da5dffa310848c5dc18af134d78eb to your computer and use it in GitHub Desktop.
Save fhsinchy/c32da5dffa310848c5dc18af134d78eb to your computer and use it in GitHub Desktop.
// src/views/Home.vue
<template>
<div class="container">
<div v-if="isLoggedIn" class="card">
<div class="card-content">
<div class="content">
Welcome back <strong>{{ user.name }}!</strong>
</div>
</div>
</div>
<div v-else class="notification is-danger">
You're not logged in!
</div>
</div>
</template>
<script>
export default {
name: 'Home',
data() {
return {
user: {},
};
},
computed: {
isLoggedIn: () => false,
},
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment