4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

Use current host in landing page (#1792)

Update WebSocketUrlField.jsx
This commit is contained in:
machenmusik 2023-04-21 02:37:46 -04:00 committed by GitHub
parent f84ad7352e
commit 3addd32b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,8 @@ export default function WebSocketUrlField() {
}
};
const currentHost = `${window.location.protocol}//${window.location.host}`;
return (
<div>
<TextField
@ -42,7 +44,7 @@ export default function WebSocketUrlField() {
helperText={testWebSocket(websocket_url) ? 'Invalid websocket URL' : ''}
/>
<Link href={`/?websocket_url=${websocket_url}`}>
viewer.nerf.studio?websocket_url={websocket_url}
{currentHost}?websocket_url={websocket_url}
</Link>
</div>
);