Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

udpated prices and removed upgradePlan function

Blue Mousefe9db2bcc4bb
diff --git a/src/api/index.js b/src/api/index.js
index 57275a883..4ab109626 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -92,19 +92,6 @@ export const changeUserDetails = (data) =>
throw new Error(errorsArray)
})
-export const upgradePlan = (planCode) =>
- api.post('/user/upgrade', { planCode }).catch((error) => {
- if (error?.response) {
- const errorsArray = error.response.data.message
- if (Array.isArray(errorsArray)) {
- throw errorsArray
- }
- throw new Error(errorsArray)
- } else {
- throw new Error(error)
- }
- })
-
export const forgotPassword = (email) =>
api
.post('/auth/reset-password', email)
diff --git a/src/pages/MainPage/Pricing.jsx b/src/pages/MainPage/Pricing.jsx
index 28564e0d0..1074e8240 100644
--- a/src/pages/MainPage/Pricing.jsx
+++ b/src/pages/MainPage/Pricing.jsx
@@ -13,7 +13,7 @@ import Spin from '../../ui/icons/Spin'
import { errorsActions } from 'redux/actions/errors'
import { alertsActions } from 'redux/actions/alerts'
import { authActions } from 'redux/actions/auth'
-import { upgradePlan, authMe } from 'api'
+import { authMe } from 'api'
import routes from 'routes'
const getTiers = (t) => [
@@ -31,7 +31,7 @@ const getTiers = (t) => [
{
name: t('pricing.tiers.freelancer'),
planCode: 'freelancer',
- priceMonthly: 24,
+ priceMonthly: 15,
includedFeatures: [
t('pricing.tiers.evXPlanIncl', { plan: t('pricing.tiers.hobby') }),
t('pricing.tiers.xEvMo', { amount: '100k' }),
@@ -45,7 +45,7 @@ const getTiers = (t) => [
{
name: t('pricing.tiers.startup'),
planCode: 'startup',
- priceMonthly: 72,
+ priceMonthly: 59,
includedFeatures: [
t('pricing.tiers.evXPlanIncl', { plan: t('pricing.tiers.freelancer') }),
t('pricing.tiers.xEvMo', { amount: '500k' }),
@@ -96,8 +96,7 @@ const Pricing = ({ t, language }) => {
} catch (e) {
dispatch(authActions.logout())
}
-
- // @TODO: add 'sub downgraded' message
+
dispatch(alertsActions.accountUpdated('The subscription has been upgraded.'))
}, 1000)
setPlanCodeLoading(null)