Last active
August 24, 2018 22:36
-
-
Save considine/b24715e60e63a8140294f9750048c23a to your computer and use it in GitHub Desktop.
redirect to login if no user
This file contains 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
const HomeComponent = Vue.component("home-component", { | |
template : "<div> \ | |
<h1> Hello World! </h1> \ | |
</div>", | |
mounted : function () { | |
if (!Parse.User.current()) { | |
this.$router.replace("/login"); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment