Skip to content

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

update metadata

Ashish Viradiya1b3e1027c9a2
diff --git a/app/(auth)/verify/invitation/page.tsx b/app/(auth)/verify/invitation/page.tsx
index 6741a392..4e60cc06 100644
--- a/app/(auth)/verify/invitation/page.tsx
+++ b/app/(auth)/verify/invitation/page.tsx
@@ -1,3 +1,4 @@
+import { Metadata } from "next";
import Link from "next/link";
import NotFound from "@/pages/404";
@@ -8,6 +9,40 @@ import { generateChecksum } from "@/lib/utils/generate-checksum";
import { Button } from "@/components/ui/button";
+const data = {
+ description: "Accept your team invitation on Papermark",
+ title: "Accept Invitation | Papermark",
+ url: "/verify/invitation",
+};
+
+export const metadata: Metadata = {
+ metadataBase: new URL("https://www.papermark.com"),
+ title: data.title,
+ description: data.description,
+ openGraph: {
+ title: data.title,
+ description: data.description,
+ url: data.url,
+ siteName: "Papermark",
+ images: [
+ {
+ url: "/_static/meta-image.png",
+ width: 800,
+ height: 600,
+ },
+ ],
+ locale: "en_US",
+ type: "website",
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: data.title,
+ description: data.description,
+ creator: "@papermarkio",
+ images: ["/_static/meta-image.png"],
+ },
+};
+
export default function VerifyInvitationPage({
searchParams,
}: {
@@ -65,7 +100,7 @@ export default function VerifyInvitationPage({
</span>
</Link>
<h3 className="text-balance py-1 text-sm font-normal text-gray-800">
- You've been invited to join a team on Papermark
+ You&apos;ve been invited to join a team on Papermark
</h3>
<div className="mt-2 flex items-center gap-2 rounded-full bg-gray-50 px-4 py-2 text-sm text-gray-600 shadow-sm">
<MailIcon className="h-4 w-4 text-gray-400" />
@@ -80,21 +115,23 @@ export default function VerifyInvitationPage({
</Button>
</Link>
</div>
- <div className="text-center text-sm text-gray-500">
- <p className="flex items-center justify-center gap-1.5 rounded-md bg-amber-50 px-3 py-2 text-amber-700">
- <ClockIcon className="h-4 w-4 text-amber-500" />
- <span>
- Expires on{" "}
- <span className="font-medium">
- {format(new Date(expiresAt!), "MMM d, yyyy")}
- </span>{" "}
- at{" "}
- <span className="font-medium">
- {format(new Date(expiresAt!), "h:mm a")}
+ {expiresAt ? (
+ <div className="text-center text-sm text-gray-500">
+ <p className="flex items-center justify-center gap-1.5 rounded-md bg-amber-50 px-3 py-2 text-amber-700">
+ <ClockIcon className="h-4 w-4 text-amber-500" />
+ <span>
+ Expires on{" "}
+ <span className="font-medium">
+ {format(new Date(expiresAt!), "MMM d, yyyy")}
+ </span>{" "}
+ at{" "}
+ <span className="font-medium">
+ {format(new Date(expiresAt!), "h:mm a")}
+ </span>
</span>
- </span>
- </p>
- </div>
+ </p>
+ </div>
+ ) : null}
</div>
<p className="mt-10 w-full max-w-md px-4 text-xs text-muted-foreground sm:px-16">
By accepting this invitation, you acknowledge that you have read and
diff --git a/pages/api/teams/[teamId]/invitations/resend.ts b/pages/api/teams/[teamId]/invitations/resend.ts
index 03213b85..8fd5b4d6 100644
--- a/pages/api/teams/[teamId]/invitations/resend.ts
+++ b/pages/api/teams/[teamId]/invitations/resend.ts
@@ -127,7 +127,6 @@ export default async function handle(
verifyParams.append("checksum", checksum);
const verifyUrl = `${process.env.NEXT_PUBLIC_BASE_URL}/verify/invitation?${verifyParams.toString()}`;
- console.log("verifyUrl", verifyUrl);
sendTeammateInviteEmail({
senderName: sender.name || "",