1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-10 01:16:39 +02:00

fix: proper check for billing seats on user creation (#3432)

https://unleash-community.slack.com/archives/C033ES94QMT/p1680236503981349
Fixes the user creation extra seat billing alert to only show when the
total users exceed the number of free seats.
This commit is contained in:
Nuno Góis 2023-03-31 11:37:33 +01:00 committed by GitHub
parent 013003d63e
commit e903a3ae89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ export const SeatCostWarning: VFC = () => {
const { users } = useUsers();
const { isBillingUsers, seats, planUsers } = useUsersPlan(users);
if (!isBillingUsers) {
if (!isBillingUsers || planUsers.length < seats) {
return null;
}