Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: improve code readability

Marc Seitz6ee147a3a471
diff --git a/components/domains/domain-card.tsx b/components/domains/domain-card.tsx
index c0673a80..4fa1f207 100644
--- a/components/domains/domain-card.tsx
+++ b/components/domains/domain-card.tsx
@@ -82,7 +82,7 @@ export default function DomainCard({
<>
<div
ref={domainRef}
- className="hover:drop-shadow-card-hover group rounded-xl border border-gray-200 bg-white p-4 transition-[filter] dark:border-gray-400 dark:bg-secondary sm:p-5"
+ className="group rounded-xl border border-gray-200 bg-white p-4 transition-[filter] dark:border-gray-400 dark:bg-secondary sm:p-5"
onPointerEnter={() => setGroupHover(true)}
onPointerLeave={() => setGroupHover(false)}
>
diff --git a/components/ui/checkbox.tsx b/components/ui/checkbox.tsx
index 70d798c4..1a73b880 100644
--- a/components/ui/checkbox.tsx
+++ b/components/ui/checkbox.tsx
@@ -15,7 +15,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Root
ref={ref}
className={cn(
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
+ "peer h-5 w-5 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
className,
)}
{...props}
@@ -23,7 +23,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Indicator
className={cn("flex items-center justify-center text-current")}
>
- <Check className="h-4 w-4" />
+ <Check className="h-3 w-3" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
));
diff --git a/ee/limits/handler.ts b/ee/limits/handler.ts
index a93dba4c..577734a5 100644
--- a/ee/limits/handler.ts
+++ b/ee/limits/handler.ts
@@ -2,7 +2,7 @@ import { NextApiRequest, NextApiResponse } from "next";
import { getLimits } from "@/ee/limits/server";
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { getServerSession } from "next-auth";
+import { getServerSession } from "next-auth/next";
import { CustomUser } from "@/lib/types";
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
index 328fd858..786cbd62 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
@@ -6,6 +6,7 @@ import { waitUntil } from "@vercel/functions";
import { getServerSession } from "next-auth/next";
import { errorhandler } from "@/lib/errorHandler";
+import { getFeatureFlags } from "@/lib/featureFlags";
import prisma from "@/lib/prisma";
import { sendDataroomChangeNotificationTask } from "@/lib/trigger/dataroom-change-notification";
import { CustomUser } from "@/lib/types";
@@ -160,9 +161,7 @@ export default async function handle(
});
// Check if the team has the change notification feature flag enabled
- const featureFlags = await fetch(
- `${process.env.NEXTAUTH_URL}/api/feature-flags?teamId=${teamId}`,
- ).then((res) => res.json());
+ const featureFlags = await getFeatureFlags({ teamId });
if (featureFlags.roomChangeNotifications) {
// Get all delayed and queued runs for this dataroom