import Link from "next/link"; import { Trans } from "@/components/trans"; import { getLicense } from "@/features/licensing/queries"; import { getUserCount } from "@/features/user/queries"; import { isSelfHosted } from "@/utils/constants"; export async function LicenseLimitWarning() { if (!isSelfHosted) { return null; } const [license, userCount] = await Promise.all([ getLicense(), getUserCount(), ]); const userLimit = license?.seats ?? 1; if (license?.type === "ENTERPRISE" || userCount <= userLimit) { return null; } return (