Skip to content

Commit

Permalink
fix: adding a default vercel url to fix the share button
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonlunn committed Dec 7, 2024
1 parent 08517c1 commit 27aea94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/(default)/components/SharePageURLButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`

Expand Down

0 comments on commit 27aea94

Please sign in to comment.