Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix some issues

Steven Tey102fc3659e5b
diff --git a/apps/web/app/inspect/[domain]/[key]/page.tsx b/apps/web/app/inspect/[domain]/[key]/page.tsx
index 1d9a60e075..262da8a4ce 100644
--- a/apps/web/app/inspect/[domain]/[key]/page.tsx
+++ b/apps/web/app/inspect/[domain]/[key]/page.tsx
@@ -36,10 +36,10 @@ export async function generateMetadata({
const apexDomain = getApexDomain(data.url);
return constructMetadata({
- title: unescape(data.title),
- description: unescape(data.description),
- image: unescape(data.image),
- icons: `${GOOGLE_FAVICON_URL}${unescape(apexDomain)}`,
+ title: unescape(data.title || ""),
+ description: unescape(data.description || ""),
+ image: data.image,
+ icons: `${GOOGLE_FAVICON_URL}${apexDomain}`,
noIndex: true,
});
}
diff --git a/apps/web/app/proxy/[domain]/[key]/page.tsx b/apps/web/app/proxy/[domain]/[key]/page.tsx
index 5c044d9cc6..15ec5b4941 100644
--- a/apps/web/app/proxy/[domain]/[key]/page.tsx
+++ b/apps/web/app/proxy/[domain]/[key]/page.tsx
@@ -26,10 +26,10 @@ export async function generateMetadata({
const apexDomain = getApexDomain(data.url);
return constructMetadata({
- title: unescape(data.title),
- description: unescape(data.description),
- image: unescape(data.image),
- icons: `${GOOGLE_FAVICON_URL}${unescape(apexDomain)}`,
+ title: unescape(data.title || ""),
+ description: unescape(data.description || ""),
+ image: data.image,
+ icons: `${GOOGLE_FAVICON_URL}${apexDomain}`,
noIndex: true,
});
}
@@ -59,13 +59,13 @@ export default async function ProxyPage({
<main className="flex h-screen w-screen items-center justify-center">
<div className="mx-5 w-full max-w-lg overflow-hidden rounded-lg border border-gray-200 sm:mx-0">
<img
- src={unescape(data.image)}
+ src={data.image}
alt={unescape(data.title)}
className="w-full object-cover"
/>
<div className="flex space-x-3 bg-gray-100 p-5">
<img
- src={`${GOOGLE_FAVICON_URL}${unescape(apexDomain)}`}
+ src={`${GOOGLE_FAVICON_URL}${apexDomain}`}
alt={unescape(data.title)}
className="mt-1 h-6 w-6"
/>