just use window.location

This commit is contained in:
Wavering Ana 2025-01-31 19:14:57 -05:00
parent 18a86af62b
commit abd01492db
2 changed files with 3 additions and 3 deletions

View file

@ -82,7 +82,7 @@ export function LinkList({ refresh = 0 }: LinkListProps) {
const handleCopy = (shortCode: string) => {
// Use import.meta.env.VITE_BASE_URL or fall back to window.location.origin
const baseUrl = import.meta.env.VITE_API_URL || window.location.origin
const baseUrl = window.location.origin
navigator.clipboard.writeText(`${baseUrl}/${shortCode}`)
toast({
description: "Link copied to clipboard",