From 39090dd9ae07ec9a9629805c2282c13d56329098 Mon Sep 17 00:00:00 2001 From: Serge Date: Tue, 9 Jul 2024 16:09:00 +0300 Subject: [PATCH 1/2] Share Template: set UUID from query param --- src/pages/HomePage.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index ebf479d..61f59a6 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -15,6 +15,8 @@ export default function HomePage() { const uuidParams = queryParams.get("uuid"); const wizardParams = queryParams.get("wizard"); + if (!UUID) setUUID(uuidParams); + return ( <> {wizardParams && } From 79eb8fe97ae552ff18e27a882326a7629dde4b4b Mon Sep 17 00:00:00 2001 From: Serge Date: Tue, 9 Jul 2024 16:52:22 +0300 Subject: [PATCH 2/2] Share Template: uuid, no dublicates --- src/MenuBar/TopMenuBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MenuBar/TopMenuBar.tsx b/src/MenuBar/TopMenuBar.tsx index ed48d1b..7e29228 100644 --- a/src/MenuBar/TopMenuBar.tsx +++ b/src/MenuBar/TopMenuBar.tsx @@ -25,7 +25,7 @@ export default function TopMenuBar() { const templateURL = `${apiUrl}/${uuid}?format=xlsx&project=${projectID}`; const urlToCopy = import.meta.env.PROD - ? `${window.location.href}?uuid=${uuid}` + ? `${window.location.href}` : `http://localhost:5173/templates?uuid=${uuid}`; const copyLink = () => {