Skip to content

Instantly share code, notes, and snippets.

@codeofsumit
Created April 10, 2020 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeofsumit/c6b77628c86cafbca0ac2248f9e742fe to your computer and use it in GitHub Desktop.
Save codeofsumit/c6b77628c86cafbca0ac2248f9e742fe to your computer and use it in GitHub Desktop.
<template>
<div class="page section">
<div class="hero is-large">
<div class="hero-body">
<center>
<h3 class="is-size-4">
<button class="button is-loading is-white"></button>
<span>Moment kurz ☕</span>
</h3>
</center>
</div>
</div>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
export default {
middleware: 'defaultPortfolio',
mounted() {
if (!this.$auth.loggedIn) {
this.$router.replace('/login');
} else {
const id = this.allPortfolios[0]._id;
this.$router.replace(`/portfolio/${id}`);
}
},
computed: {
...mapGetters('portfolio', ['allPortfolios']),
},
};
</script>
<style lang="scss" scoped>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment