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

@ -45,7 +45,7 @@ export default function PreviewWindow({
<PreviewButton
onClick={() => {
navigator.clipboard.writeText(`http://localhost:5173`)
navigator.clipboard.writeText(`${window.location.protocol}//${window.location.hostname}:5173`)
toast.info("Copied preview link to clipboard")
}}
>
@ -73,7 +73,7 @@ export default function PreviewWindow({
ref={ref}
width={"100%"}
height={"100%"}
src={`http://localhost:5173`}
src={`${window.location.protocol}//${window.location.hostname}:5173`}
/>
</div>
)}