mirror of
https://github.com/hanzoai/dataroom.git
synced 2026-10-30 18:41:07 +00:00
108 files: README, marketing copy, page titles, meta tags, footer text, email templates, .env.example, UI strings. URLs swapped from papermark.com/papermark.io to dataroom.hanzo.ai. Internal identifiers left intact per repo policy: localStorage keys (papermark.email/papermark.name/last_papermark_login — changing them logs users out), type field names (papermarkUserId), internal helper symbols (PAPERMARK_HEADERS, PapermarkSparkle component, isPapermarkUrl helper), internal-only filenames. LLM.md retains 'Upstream: Papermark' attribution line. Per-locale .po translations regenerate from source on the next lingui-extract CI run. DB migrations untouched (append-only history; rewriting them breaks installed schemas). LICENSE stays AGPL-3.0.
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import { Dispatch, SetStateAction } from "react";
|
|
|
|
import { PlanEnum } from "@/lib/billing/legacy/constants";
|
|
import Cookies from "js-cookie";
|
|
|
|
import X from "@/components/shared/icons/x";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
import { UpgradePlanModal } from "./upgrade-plan-modal";
|
|
|
|
export default function ProBanner({
|
|
setShowProBanner,
|
|
}: {
|
|
setShowProBanner: Dispatch<SetStateAction<boolean | null>>;
|
|
}) {
|
|
const handleHideBanner = () => {
|
|
setShowProBanner(false);
|
|
Cookies.set("hideProBanner", "pro-banner", {
|
|
expires: 7,
|
|
});
|
|
};
|
|
|
|
return (
|
|
<aside className="relative mb-2 flex w-full flex-col justify-center rounded-lg border border-gray-700 bg-background p-4 text-foreground">
|
|
<button
|
|
type="button"
|
|
onClick={handleHideBanner}
|
|
className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
|
>
|
|
<X className="h-4 w-4" />
|
|
<span className="sr-only">Close</span>
|
|
</button>
|
|
<div className="flex space-x-2">
|
|
<span className="text-sm font-bold">✨ Hanzo Dataroom Business ✨</span>
|
|
</div>
|
|
<p className="my-4 text-sm">
|
|
Upgrade to unlock custom branding, team members, domains and data rooms.
|
|
</p>
|
|
<div className="flex">
|
|
<UpgradePlanModal
|
|
clickedPlan={PlanEnum.Business}
|
|
trigger={"pro_banner"}
|
|
>
|
|
<Button type="button" className="grow">
|
|
Upgrade
|
|
</Button>
|
|
</UpgradePlanModal>
|
|
</div>
|
|
</aside>
|
|
);
|
|
}
|