mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: hide trial banner when subscription expired banner is active
This commit is contained in:
@@ -409,48 +409,54 @@ export default function SubscriptionPurchase() {
|
||||
padding: '24px 28px',
|
||||
}}
|
||||
>
|
||||
{/* Trial upgrade prompt */}
|
||||
{subscription?.is_trial && (
|
||||
<div
|
||||
className="mb-6 rounded-[14px] p-4"
|
||||
style={{
|
||||
background:
|
||||
'linear-gradient(135deg, rgba(255,184,0,0.08), rgba(var(--color-accent-400),0.06))',
|
||||
border: '1px solid rgba(255,184,0,0.15)',
|
||||
}}
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
<div
|
||||
className="flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[10px]"
|
||||
style={{ background: 'rgba(255,184,0,0.12)' }}
|
||||
>
|
||||
<svg
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="#FFB800"
|
||||
strokeWidth="1.5"
|
||||
aria-hidden="true"
|
||||
{/* Trial upgrade prompt — hidden when expired banner is active */}
|
||||
{subscription?.is_trial &&
|
||||
!(
|
||||
isTariffsMode &&
|
||||
purchaseOptions &&
|
||||
'subscription_is_expired' in purchaseOptions &&
|
||||
purchaseOptions.subscription_is_expired
|
||||
) && (
|
||||
<div
|
||||
className="mb-6 rounded-[14px] p-4"
|
||||
style={{
|
||||
background:
|
||||
'linear-gradient(135deg, rgba(255,184,0,0.08), rgba(var(--color-accent-400),0.06))',
|
||||
border: '1px solid rgba(255,184,0,0.15)',
|
||||
}}
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
<div
|
||||
className="flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[10px]"
|
||||
style={{ background: 'rgba(255,184,0,0.12)' }}
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm font-semibold" style={{ color: '#FFB800' }}>
|
||||
{t('subscription.trialUpgrade.title')}
|
||||
<svg
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="#FFB800"
|
||||
strokeWidth="1.5"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div className="mt-1 text-[12px] text-dark-50/40">
|
||||
{t('subscription.trialUpgrade.description')}
|
||||
<div>
|
||||
<div className="text-sm font-semibold" style={{ color: '#FFB800' }}>
|
||||
{t('subscription.trialUpgrade.title')}
|
||||
</div>
|
||||
<div className="mt-1 text-[12px] text-dark-50/40">
|
||||
{t('subscription.trialUpgrade.description')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
|
||||
{/* Expired subscription notice */}
|
||||
{isTariffsMode &&
|
||||
|
||||
Reference in New Issue
Block a user