From b135aac8531c1e1488147ad8c6f98eddbdbe0c99 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Mon, 17 Apr 2023 18:53:55 +0000 Subject: Initial commit Created from https://vercel.com/new --- app/head.tsx | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 app/head.tsx (limited to 'app/head.tsx') diff --git a/app/head.tsx b/app/head.tsx new file mode 100644 index 0000000..aecaa44 --- /dev/null +++ b/app/head.tsx @@ -0,0 +1,42 @@ +export default function Head({ title, subtitle }: { title: string; subtitle: string }) { + // Fallback tagline + title ??= "Share Environment Variables Securely"; + subtitle ??= "EnvShare"; + + const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "http://localhost:3000"; + + const url = new URL("/api/v1/og", baseUrl); + url.searchParams.set("title", title); + url.searchParams.set("subtitle", subtitle); + + return ( + <> + EnvShare + + + + + + + + + + + {/* Open Graph / Facebook */} + + + + + + + + + {/* Twitter */} + + + + + + + ); +} -- cgit v1.2.3-70-g09d2