diff --git a/frontend/javascripts/admin/organization/organization_cards.tsx b/frontend/javascripts/admin/organization/organization_cards.tsx index 6b857970c2b..26dd6423343 100644 --- a/frontend/javascripts/admin/organization/organization_cards.tsx +++ b/frontend/javascripts/admin/organization/organization_cards.tsx @@ -161,56 +161,30 @@ export function PlanExceededAlert({ organization }: { organization: APIOrganizat } export function PlanAboutToExceedAlert({ organization }: { organization: APIOrganization }) { - const alerts = []; const activeUser = useWkSelector((state) => state.activeUser); const isAboutToExpire = dayjs.duration(dayjs(organization.paidUntil).diff(dayjs())).asWeeks() <= 6 && !hasPricingPlanExpired(organization); - if (isAboutToExpire) - alerts.push({ - message: - "Your WEBKNOSSOS plan is about to expire soon. Renew your plan now to avoid being downgraded, users being blocked, and losing access to features.", - actionButton: ( - - ), - }); - else { - alerts.push({ - message: - "Your organization is about to exceed the storage space included in your current plan. Upgrade now to avoid your account from being blocked.", - actionButton: ( - - ), - }); - } + if (isAboutToExpire) { + const actionButton = ( + + ); - return ( - <> - {alerts.map((alert) => ( - - ))} - - ); + return ( + + ); + } else return null; }