Skip to content

Commit

Permalink
Hide landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
AtanasKrondev authored and kenodressel committed Jun 9, 2021
1 parent fb83e87 commit 54a2c54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ VUE_APP_IMGUR_API_CLIENT_ID=eafea0a779e4039
VUE_APP_GIPHY_API_KEY=P16yBDlSeEfcrJfp1rwnamtEZmQHxHNM
VUE_APP_WORDBAZAAR_ENABLED=
VUE_APP_MIDDLEWARE_URL=https://mainnet.aeternity.io/mdw
VUE_APP_LANDING_ENABLED=
4 changes: 3 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export default {
...mapState('aeternity', ['sdk']),
},
async mounted() {
if (!this.isLoggedIn && this.$route.name === 'feed') {
if (process.env.VUE_APP_LANDING_ENABLED
&& !this.isLoggedIn
&& this.$route.name === 'feed') {
this.$router.push({ name: 'landing' });
}
Expand Down
4 changes: 2 additions & 2 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const routes = [
next(to.fullPath.startsWith('/#/') ? to.fullPath.slice(2) : undefined);
},
},
{
...process.env.LANDING_ENABLED ? [{
path: '/landing',
name: 'landing',
component: Landing,
meta: {
fullScreen: true,
layoutClass: 'landing-page',
},
},
}] : [],
{
path: '/search/:query',
name: 'feed-search',
Expand Down

0 comments on commit 54a2c54

Please sign in to comment.