Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: allow uploads with featureflags
Marc Seitz7e9cd0c4f553
diff --git a/components/links/link-sheet/link-options.tsx b/components/links/link-sheet/link-options.tsxindex 22e4ce55..b0368588 100644--- a/components/links/link-sheet/link-options.tsx+++ b/components/links/link-sheet/link-options.tsx@@ -230,7 +230,11 @@ export const LinkOptions = ({{linkType === LinkType.DATAROOM_LINK && targetId ? (<UploadSection{...{ data, setData }}- isAllowed={isTrial || isDataroomsPlus}+ isAllowed={+ isTrial ||+ isDataroomsPlus ||+ (isDatarooms && limits?.dataroomUpload!)+ }handleUpgradeStateChange={handleUpgradeStateChange}targetId={targetId}/>diff --git a/ee/limits/swr-handler.ts b/ee/limits/swr-handler.tsindex 21e886dc..60a16d6e 100644--- a/ee/limits/swr-handler.ts+++ b/ee/limits/swr-handler.ts@@ -2,10 +2,10 @@ import { useTeam } from "@/context/team-context";import useSWR from "swr";import { z } from "zod";+import { usePlan } from "@/lib/swr/use-billing";import { fetcher } from "@/lib/utils";import { configSchema } from "./server";-import { usePlan } from "@/lib/swr/use-billing";export type LimitProps = z.infer<typeof configSchema> & {usage: {@@ -13,7 +13,7 @@ export type LimitProps = z.infer<typeof configSchema> & {links: number;users: number;};- dataroomUpload?: boolean;+ dataroomUpload: boolean;};export function useLimits() {@@ -34,7 +34,8 @@ export function useLimits() {: true;const canAddLinks = data?.links ? data?.usage?.links < data?.links : true;const canAddUsers = data?.users ? data?.usage?.users < data?.users : true;- const showUpgradePlanModal = (isFree && !isTrial) || (isTrial && !canAddUsers);+ const showUpgradePlanModal =+ (isFree && !isTrial) || (isTrial && !canAddUsers);return {showUpgradePlanModal,