Skip to content

Commit 4be9ba6

Browse files
committedMar 24, 2025
fix: handling type === gold check in license notifications
1 parent 8e0423d commit 4be9ba6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎packages/core/admin/ee/admin/src/hooks/useLicenseLimitNotification.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { useLicenseLimits } from './useLicenseLimits';
1515

1616
const STORAGE_KEY_PREFIX = 'strapi-notification-seat-limit';
1717

18+
const BILLING_SELF_HOSTED_URL = 'https://strapi.io/billing/request-seats';
1819
const MANAGE_SEATS_URL = 'https://strapi.io/billing/manage-seats';
1920

2021
export const useLicenseLimitNotification = () => {
@@ -23,7 +24,7 @@ export const useLicenseLimitNotification = () => {
2324
const { toggleNotification } = useNotification();
2425
const { pathname } = useLocation();
2526

26-
const { enforcementUserCount, permittedSeats, licenseLimitStatus, isHostedOnStrapiCloud } =
27+
const { enforcementUserCount, permittedSeats, licenseLimitStatus, type } =
2728
license ?? {};
2829

2930
React.useEffect(() => {
@@ -66,7 +67,7 @@ export const useLicenseLimitNotification = () => {
6667
}
6768
),
6869
link: {
69-
url: MANAGE_SEATS_URL,
70+
url: type === 'gold' ? BILLING_SELF_HOSTED_URL : MANAGE_SEATS_URL,
7071
label: formatMessage({
7172
id: 'notification.ee.warning.seat-limit.link',
7273
defaultMessage: 'Manage seats',
@@ -87,7 +88,7 @@ export const useLicenseLimitNotification = () => {
8788
permittedSeats,
8889
licenseLimitStatus,
8990
enforcementUserCount,
90-
isHostedOnStrapiCloud,
9191
isError,
92+
type,
9293
]);
9394
};

0 commit comments

Comments
 (0)
Please sign in to comment.