Replace references to the app base URL with a dynamically generated URL.

This commit is contained in:
James Murdza
2024-06-07 13:01:28 -04:00
parent e5a36a4626
commit e58d088b5f
3 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ export default function ShareSandboxModal({
<Button
onClick={() => {
navigator.clipboard.writeText(
`${process.env.NEXT_PUBLIC_APP_URL}/code/${data.id}`
`${window.location.protocol}//${window.location.hostname}/code/${data.id}`
)
toast.success("Link copied to clipboard.")
}}