From 27aea943623851e05afaf728e82472fddba0556e Mon Sep 17 00:00:00 2001 From: Clinton Lunn Date: Sat, 7 Dec 2024 10:38:25 -0700 Subject: [PATCH] fix: adding a default vercel url to fix the share button --- src/app/(default)/components/SharePageURLButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(default)/components/SharePageURLButton.tsx b/src/app/(default)/components/SharePageURLButton.tsx index 43500a25b..3cac7e520 100644 --- a/src/app/(default)/components/SharePageURLButton.tsx +++ b/src/app/(default)/components/SharePageURLButton.tsx @@ -10,7 +10,7 @@ import { ControlledTooltip } from '@/components/ui/Tooltip' */ export const SharePageURLButton: React.FC<{ path: string, name: string }> = ({ path, name }) => { const slug = getFriendlySlug(name) - const baseUrl = process.env.NEXT_PUBLIC_BASE_URL != null ? process.env.NEXT_PUBLIC_BASE_URL : 'http://localhost:3000' + const baseUrl = process.env.VERCEL_URL != null ? `https://${process.env.VERCEL_URL}` : 'http://localhost:3000' const optionalSlug = slug !== '' ? `/${slug}` : '' const url = `${baseUrl}${path}${optionalSlug}`