Skip to content

Commit

Permalink
Enable Wordbazaar .env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
AtanasKrondev authored and thepiwo committed Feb 10, 2021
1 parent 0a2f179 commit 9a3970c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ VUE_APP_CONTRACT_V3_ADDRESS=ct_2Hyt9ZxzXra5NAzhePkRsDPDWppoatVD7CtHnUoHVbuehwR8N
VUE_APP_WORD_REGISTRY_ADDRESS=ct_2cYtnXKZE5BhuRMstJBEzvfmdZkrE5LooomcZ6XXzjfyEZPXCq
VUE_APP_IMGUR_API_CLIENT_ID=eafea0a779e4039
VUE_APP_GIPHY_API_KEY=P16yBDlSeEfcrJfp1rwnamtEZmQHxHNM
VUE_APP_WORDBAZAAR_ENABLED=
1 change: 1 addition & 0 deletions .env.tnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ VUE_APP_CONTRACT_V1_ADDRESS=ct_2Cvbf3NYZ5DLoaNYAU71t67DdXLHeSXhodkSNifhgd7Xsw28X
VUE_APP_CONTRACT_V2_ADDRESS=ct_2ZEoCKcqXkbz2uahRrsWeaPooZs9SdCv6pmC4kc55rD4MhqYSu
VUE_APP_CONTRACT_V3_ADDRESS=ct_WscpdLQf6ZZxoVqrsEwUwmuAEdzEkJii5W5TzG84rVgHeK6BW
VUE_APP_WORD_REGISTRY_ADDRESS=ct_2sHzycCWkiyfZkCMoprn3Q7U8SQh3FYXp6iB1RAFVJy1pNWZAY
VUE_APP_WORDBAZAAR_ENABLED=true
1 change: 1 addition & 0 deletions src/components/layout/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default {
props: {
mobile: Boolean,
},
data: () => ({ showWordBazaar: process.env.VUE_APP_WORDBAZAAR_ENABLED }),
computed: {
...mapGetters(['isLoggedIn']),
...mapState(['address']),
Expand Down
8 changes: 8 additions & 0 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const routes = [
title: 'WordBazaar',
},
props: true,
beforeEnter(to, from, next) {
if (process.env.VUE_APP_WORDBAZAAR_ENABLED) next();
else next({ name: 'feed' });
},
},
{
path: '/word/:word',
Expand All @@ -66,6 +70,10 @@ const routes = [
title: 'Word Detail',
},
props: true,
beforeEnter(to, from, next) {
if (process.env.VUE_APP_WORDBAZAAR_ENABLED) next();
else next({ name: 'feed' });
},
},
{
path: '/user-profile/:address',
Expand Down

0 comments on commit 9a3970c

Please sign in to comment.