Compare commits
1 Commits
main
...
feat/no-lo
Author | SHA1 | Date | |
---|---|---|---|
|
e58d088b5f |
@ -42,7 +42,7 @@ export default function CodeEditor({
|
||||
reactDefinitionFile: string
|
||||
}) {
|
||||
const socket = io(
|
||||
`http://localhost:${process.env.NEXT_PUBLIC_SERVER_PORT}?userId=${userData.id}&sandboxId=${sandboxData.id}`,
|
||||
`${window.location.protocol}//${window.location.hostname}:${process.env.NEXT_PUBLIC_SERVER_PORT}?userId=${userData.id}&sandboxId=${sandboxData.id}`,
|
||||
{
|
||||
timeout: 2000,
|
||||
}
|
||||
|
@ -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.")
|
||||
}}
|
||||
|
@ -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>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user