()
| 310 | } |
| 311 | |
| 312 | export function BannersWrapper() { |
| 313 | const { needConfigureExternalUrl } = useServerState(); |
| 314 | const { currentPlan, daysBeforeExpire, isExpired, isTrialing } = |
| 315 | useSubscriptionState(); |
| 316 | |
| 317 | const shouldShowSubscriptionBanner = |
| 318 | isExpired || |
| 319 | isTrialing || |
| 320 | (currentPlan !== PlanType.FREE && |
| 321 | daysBeforeExpire <= LICENSE_EXPIRATION_THRESHOLD); |
| 322 | const shouldShowExternalUrlBanner = !isDev() && needConfigureExternalUrl; |
| 323 | |
| 324 | return ( |
| 325 | <> |
| 326 | <BannerUpgradeSubscription /> |
| 327 | {shouldShowSubscriptionBanner ? <BannerSubscription /> : null} |
| 328 | {shouldShowExternalUrlBanner ? <BannerExternalUrl /> : null} |
| 329 | <BannerAnnouncement /> |
| 330 | </> |
| 331 | ); |
| 332 | } |
nothing calls this directly
no test coverage detected