From c25872d586928eea5040f8d0af3e56b3c4268d51 Mon Sep 17 00:00:00 2001 From: Joe Heffernan Date: Mon, 30 Sep 2024 10:57:09 -0700 Subject: [PATCH] use location.origin in snippet url --- src/components/ShareTrajectoryModal/EmbedSnippetPanel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);