mirror of
https://github.com/docmost/docmost.git
synced 2026-05-21 09:14:07 +08:00
feat: feature flag upgrade
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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");
|
||||
}
|
||||
Reference in New Issue
Block a user