📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
displaying the next billing date
Blue Mouse7cbe2037506b
diff --git a/public/locales/en.json b/public/locales/en.jsonindex c7097f940..417f7b919 100644--- a/public/locales/en.json+++ b/public/locales/en.json@@ -384,7 +384,8 @@"title": "Billing & Plans","desc": "It is free to get started and use our services.\nIf you need to handle more traffic, you probably need to upgrade your plan.\nBelow is a list of available plans. No hidden fees or other BS, everything is clear and transparent!","contact": "Need to track more than 1 million events per month?\nContact us at <mail>{{email}}</mail> to discuss your needs.",- "update": "Update payment details"+ "update": "Update payment details",+ "nextBillDate": "Next bill date:"},"pricing": {"title": "Pricing Plans",diff --git a/src/pages/Billing/index.jsx b/src/pages/Billing/index.jsxindex 526347b6c..37ff99861 100644--- a/src/pages/Billing/index.jsx+++ b/src/pages/Billing/index.jsx@@ -2,27 +2,34 @@import React, { memo } from 'react'import { useTranslation, Trans } from 'react-i18next'import { useSelector } from 'react-redux'+import dayjs from 'dayjs'+import utc from 'dayjs/plugin/utc'import { CONTACT_EMAIL, paddleLanguageMapping } from 'redux/constants'import { withAuthentication, auth } from 'hoc/protected'import Title from 'components/Title'import Pricing from '../MainPage/Pricing'+dayjs.extend(utc)+const Features = () => {const { user } = useSelector(state => state.auth)const { theme } = useSelector(state => state.ui.theme)const { t, i18n: { language } } = useTranslation('common')+ const {+ nextBillDate, planCode, subUpdateURL,+ } = user- const isFree = user.planCode === 'free'+ const isFree = planCode === 'free'const onUpdatePaymentDetails = () => {if (!window.Paddle) {- window.location.replace(user.subUpdateURL)+ window.location.replace(subUpdateURL)return}window.Paddle.Checkout.open({- override: user.subUpdateURL,+ override: subUpdateURL,method: 'inline',frameTarget: 'checkout-container',frameInitialHeight: 416,@@ -52,6 +59,20 @@ const Features = () => {<p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>{t('billing.desc')}</p>+ <hr className='mt-3 mb-2' />+ {nextBillDate && (+ <div className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>+ <span className='font-bold'>+ {t('billing.nextBillDate')}+ </span>+ + <span>+ {language === 'en'+ ? dayjs(nextBillDate).locale(language).format('MMMM D, YYYY')+ : dayjs(nextBillDate).locale(language).format('D MMMM, YYYY')}+ </span>+ </div>+ )}<Pricing t={t} language={language} /><p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight mt-10'><Trans