diff --git a/src/components/ShareTrajectoryModal/EmbedSnippetPanel.tsx b/src/components/ShareTrajectoryModal/EmbedSnippetPanel.tsx index d4c51af2..ecbd377a 100644 --- a/src/components/ShareTrajectoryModal/EmbedSnippetPanel.tsx +++ b/src/components/ShareTrajectoryModal/EmbedSnippetPanel.tsx @@ -32,8 +32,8 @@ const EmbedSnippetPanel = ({ startTime }: EmbedSnippetPanelProps) => { const [showEmbedSettingsPanel, setShowEmbedSettingsPanel] = React.useState(false); - const url = `http://${location.host}/embed?trajFileName=${trajectory}&t=${startTime}}`; - const embedSnippet = ``; + const url = `${location.origin}/embed?trajFileName=${trajectory}&t=${startTime}`; + const embedSnippet = ``; const inputIsValid = (input: string) => { return !Number.isNaN(parseInt(input)); }; @@ -100,7 +100,7 @@ const EmbedSnippetPanel = ({ startTime }: EmbedSnippetPanelProps) => { /> x { handleChangeHeight(e.target.value);