fix(ui): safely access currentPlan properties in OrganizationRoute component (#8178)

This commit is contained in:
Pavlos Koutoglou
2024-11-18 12:54:17 +02:00
committed by GitHub
parent b9244d0544
commit fe151cd1ea

View File

@@ -672,7 +672,7 @@ const OrganizationRoute = () => {
<Popover className="min-w-max border select-none text-sm border-solid border-[--hl-sm] shadow-lg bg-[--color-bg] py-2 rounded-md overflow-y-auto max-h-[85vh] focus:outline-none">
{currentPlan && Boolean(currentPlan.type) && (
<div className='flex gap-2 justify-between items-center pb-2 px-[--padding-md] border-b border-solid border-[--hl-sm] text-[--color-font] h-[--line-height-xs] w-full text-md whitespace-nowrap capitalize'>
<span>{currentPlan.planName ?? formatCurrentPlanType(currentPlan.type)} Plan</span>
<span>{currentPlan?.planName ?? formatCurrentPlanType(currentPlan.type)} Plan</span>
<UpgradeButton currentPlan={currentPlan} />
</div>
)}