Skip to content

Commit

Permalink
fix(config): try to define a function to use subscription env value
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Nov 10, 2021
1 parent 7b553c9 commit 7488454
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
return {
// References
displayedSpaces,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED(),
localState,
searchText,
// Methods
Expand Down
2 changes: 1 addition & 1 deletion src/config/subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const PRO_PLAN_ID = process.env.VUE_APP_PRO_PLAN_ID;
const PRO_PLAN_STORAGE = process.env.VUE_APP_PRO_PLAN_STORAGE;
const DATAPACK_PLAN_ID = process.env.VUE_APP_DATAPACK_PLAN_ID;

const IS_SUBSCRIPTION_ENABLED = (() => SUBSCRIPTION_ENABLED === "true")();
const IS_SUBSCRIPTION_ENABLED = () => SUBSCRIPTION_ENABLED === "true";

export {
IS_SUBSCRIPTION_ENABLED,
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const routes = [
}
},
// Add subscription routes if enabled
...(IS_SUBSCRIPTION_ENABLED ? subscriptionRoutes : []),
...(IS_SUBSCRIPTION_ENABLED() ? subscriptionRoutes : []),
// Add legacy routes for retro-compatibility
...legacyRoutes,
{
Expand Down
2 changes: 1 addition & 1 deletion src/views/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
return {
// References
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED(),
projects: userProjects,
spaces: userSpaces,
// Methods
Expand Down
2 changes: 1 addition & 1 deletion src/views/project-board/ProjectBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default {
// References
currentTab,
currentView,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED(),
tabs,
space: currentSpace,
spaceInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/views/space-board/SpaceBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
return {
// References
invitations: spaceInvitations,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED(),
projects: displayedProjects,
searchText,
space: currentSpace,
Expand Down
2 changes: 1 addition & 1 deletion src/views/user-spaces/UserSpaces.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
return {
// References
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED,
isSubscriptionEnabled: IS_SUBSCRIPTION_ENABLED(),
organizations: userOrganizations,
searchText,
spaces: displayedSpaces,
Expand Down

0 comments on commit 7488454

Please sign in to comment.