mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-01 23:59:09 +00:00
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
"use client";
|
|
import { Alert, AlertDescription } from "@app/components/ui/alert";
|
|
import { build } from "@server/build";
|
|
import { useTranslations } from "next-intl";
|
|
import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext";
|
|
import { useSubscriptionStatusContext } from "@app/hooks/useSubscriptionStatusContext";
|
|
|
|
export function SecurityFeaturesAlert() {
|
|
const t = useTranslations();
|
|
const { isUnlocked } = useLicenseStatusContext();
|
|
const subscriptionStatus = useSubscriptionStatusContext();
|
|
|
|
return (
|
|
<>
|
|
{build === "saas" && !subscriptionStatus?.isSubscribed() ? (
|
|
<Alert variant="info" className="mb-6">
|
|
<AlertDescription>
|
|
{t("subscriptionRequiredToUse")}
|
|
</AlertDescription>
|
|
</Alert>
|
|
) : null}
|
|
|
|
{build === "enterprise" && !isUnlocked() ? (
|
|
<Alert variant="info" className="mb-6">
|
|
<AlertDescription>
|
|
{t("licenseRequiredToUse")}
|
|
</AlertDescription>
|
|
</Alert>
|
|
) : null}
|
|
</>
|
|
);
|
|
}
|