mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
17 lines
499 B
TypeScript
17 lines
499 B
TypeScript
import { useAtom } from "jotai";
|
|
import { useTranslation } from "react-i18next";
|
|
import { workspaceAtom } from "@/features/user/atoms/current-user-atom";
|
|
import { isCloud } from "@/lib/config";
|
|
|
|
export function useUpgradeLabel(): string {
|
|
const { t } = useTranslation();
|
|
const [workspace] = useAtom(workspaceAtom);
|
|
|
|
if (!isCloud()) {
|
|
return workspace?.hasLicenseKey
|
|
? t("Upgrade your license tier.")
|
|
: t("Available with a paid license");
|
|
}
|
|
return t("Upgrade your plan");
|
|
}
|