Created
December 5, 2020 02:27
-
-
Save spiritbroski/c5d9fd39d9fc162d5957052f568dff91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // pages/index.vue | |
| <template> | |
| <Home :login="login" /> | |
| </template> | |
| <script lang="ts"> | |
| import Cookies from 'js-cookie' | |
| import Home from '@/components/Home.vue' | |
| import { Component, Vue } from 'nuxt-property-decorator' | |
| @Component({ | |
| components: { | |
| Home, | |
| }, | |
| }) | |
| export default class MyStore extends Vue { | |
| public login: boolean = | |
| Cookies.get('token') && Cookies?.get('token')?.trim() !== '' | |
| ? true | |
| : false | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment