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!

use plan -> none

Blue Mouse13ce561bac47
diff --git a/public/locales/en.json b/public/locales/en.json
index 8f3835e01..f373ebfc8 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -582,7 +582,8 @@
"nextBillDate": "Next bill date:",
"trialEnds": "Trial ends {{date}}",
"cancelSub": "Cancel subscription",
- "noSubWarning": "You don't have an active subscription.\nNo new analytics data will be stored into our database. You can still view the data that was collected before the subscription was cancelled."
+ "noSubWarning": "You don't have an active subscription.\nNo new analytics data will be stored into our database. You can still view the data that was collected before the subscription was cancelled.",
+ "inactive": "Inactive"
},
"modals": {
"paidFeature": {
diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx
index 5806a25e8..38005534f 100644
--- a/src/components/Header/index.jsx
+++ b/src/components/Header/index.jsx
@@ -350,6 +350,15 @@ const Header = ({
{status}
</Link>
)}
+ {user?.planCode === 'none' && (
+ <Link
+ to={routes.billing}
+ className='flex justify-center items-center text-base select-none font-medium py-2 px-2 rounded-md text-rose-800 bg-rose-200 dark:bg-rose-300 hover:bg-rose-300 dark:hover:bg-rose-200'
+ key='NoSubscription'
+ >
+ {t('billing.inactive')}
+ </Link>
+ )}
<div onClick={() => buttonRef.current?.click()}>
<Link to={routes.user_settings} className='w-full flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-white bg-indigo-600 hover:bg-indigo-700'>
{t('common.you')}
diff --git a/src/pages/Billing/index.jsx b/src/pages/Billing/index.jsx
index d61719bd0..2b508feff 100644
--- a/src/pages/Billing/index.jsx
+++ b/src/pages/Billing/index.jsx
@@ -22,11 +22,12 @@ const Billing = () => {
const { theme } = useSelector(state => state.ui.theme)
const { t, i18n: { language } } = useTranslation('common')
const {
- nextBillDate, planCode, subUpdateURL, trialEndDate, timeFormat, isPaymentActive,
+ nextBillDate, planCode, subUpdateURL, trialEndDate, timeFormat,
} = user
const isFree = planCode === 'free'
const isTrial = planCode === 'trial'
+ const isNoSub = planCode === 'none'
const isTrialEnded = useMemo(() => {
if (!trialEndDate) {
@@ -151,7 +152,7 @@ const Billing = () => {
</span>
</div>
)}
- {!isPaymentActive && !isFree && isTrialEnded && (
+ {isNoSub && (
<div className='flex items-center text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<ExclamationTriangleIcon className='h-10 w-10 mr-2 text-red-600' aria-hidden='true' />
<span className='font-bold max-w-prose'>