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.

Create page.tsx

Tim Wilson4ac9db4bba1b
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/[...link]/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/[...link]/page.tsx
new file mode 100644
index 0000000000..16e27dfed0
--- /dev/null
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/[...link]/page.tsx
@@ -0,0 +1,22 @@
+import { notFound } from "next/navigation";
+
+export default function LinkPage({
+ params,
+}: {
+ params: {
+ slug: string;
+ link: string | string[];
+ };
+}) {
+ const linkParts = Array.isArray(params.link) ? params.link : null;
+ if (!linkParts) notFound();
+
+ const domain = linkParts[0];
+ const key = linkParts.length > 1 ? linkParts.slice(1).join("/") : "_root";
+
+ return (
+ <div>
+ LinkPage {domain} {key}
+ </div>
+ );
+}