From 45373f655f68fdd0b320cde175b6108454ad4731 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 17 Jul 2021 20:32:22 +0530 Subject: Removed Franz paid plans features: - serviceLimit - planSelection - trialStatusBar and other Franz features that were for different tiers of subscription. --- src/helpers/plan-helpers.js | 53 --------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/helpers/plan-helpers.js (limited to 'src/helpers') diff --git a/src/helpers/plan-helpers.js b/src/helpers/plan-helpers.js deleted file mode 100644 index b474f8bbd..000000000 --- a/src/helpers/plan-helpers.js +++ /dev/null @@ -1,53 +0,0 @@ -import { defineMessages } from 'react-intl'; -import { PLANS_MAPPING, PLANS } from '../config'; - -const messages = defineMessages({ - [PLANS.PRO]: { - id: 'pricing.plan.pro', - defaultMessage: '!!!Professional', - }, - [PLANS.PERSONAL]: { - id: 'pricing.plan.personal', - defaultMessage: '!!!Personal', - }, - [PLANS.FREE]: { - id: 'pricing.plan.free', - defaultMessage: '!!!Free', - }, - [PLANS.LEGACY]: { - id: 'pricing.plan.legacy', - defaultMessage: '!!!Premium', - }, -}); - -export function cleanupPlanId(id) { - return id.replace(/(.*)-x[0-9]/, '$1'); -} - -export function i18nPlanName(planId, intl) { - if (!planId) { - throw new Error('planId is required'); - } - - if (!intl) { - throw new Error('intl context is required'); - } - - const id = cleanupPlanId(planId); - - const plan = PLANS_MAPPING[id]; - - return intl.formatMessage(messages[plan]); -} - -export function getPlan(planId) { - if (!planId) { - throw new Error('planId is required'); - } - - const id = cleanupPlanId(planId); - - const plan = PLANS_MAPPING[id]; - - return plan; -} -- cgit v1.2.3-70-g09d2