Skip to content

Commit

Permalink
Renamed variable in LicenseNotification for better semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
jvorcak committed Oct 29, 2024
1 parent 8d3eb7d commit 1e3c63a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/license/LicenseNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { License_Type } from '../../protogen/redpanda/api/console/v1alpha1/licen

export const LicenseNotification = observer(() => {
const location = useLocation();
const expiredLicenses = api.licenses.filter(licenseIsExpired).filter(license => license.type !== License_Type.TRIAL) ?? [];
const visibleExpiredLicenses = api.licenses.filter(licenseIsExpired).filter(license => license.type !== License_Type.TRIAL) ?? [];
const soonToExpireLicenses = api.licenses
.filter(licenseSoonToExpire)
.filter(licenseCanExpire)
?? [];

const showSomeLicenseExpirationInfo = expiredLicenses.length || soonToExpireLicenses.length;
const showSomeLicenseExpirationInfo = visibleExpiredLicenses.length || soonToExpireLicenses.length;
const showEnterpriseFeaturesWarning = api.licenseViolation;

if (api.licensesLoaded === undefined) {
Expand Down Expand Up @@ -45,8 +45,8 @@ export const LicenseNotification = observer(() => {
)}
</Box>}

{expiredLicenses.length > 0 && <Box>
{expiredLicenses.map((license, idx) =>
{visibleExpiredLicenses.length > 0 && <Box>
{visibleExpiredLicenses.map((license, idx) =>
<Text key={idx}>Your {prettyLicenseType(license, true)} license has expired.</Text>
)}
</Box>}
Expand Down

0 comments on commit 1e3c63a

Please sign in to comment.