just use window.location
This commit is contained in:
parent
18a86af62b
commit
abd01492db
2 changed files with 3 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue