From f7ebc56856381051f85b5c52368a99c762d07175 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Thu, 8 Jan 2026 22:32:36 -0700 Subject: [PATCH] (FIX): Actually fixed it --- web/src/components/buttons/ShareButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/components/buttons/ShareButton.tsx b/web/src/components/buttons/ShareButton.tsx index 02f67c0..a33459f 100644 --- a/web/src/components/buttons/ShareButton.tsx +++ b/web/src/components/buttons/ShareButton.tsx @@ -1,7 +1,6 @@ import { useState } from "react"; import { EngagementShareRecipe } from "../../services/EngagementService"; import { isApiError } from "../../types/api/error"; -import { GetBackendUrl } from "../../services/environment"; import ROUTE_CONSTANTS from "../../types/routes"; @@ -15,8 +14,11 @@ export default function ShareButton({ id }: ShareButtonProps) { const clickHandler = async () => { if (clicked) return; + console.log(window.location); // Copy first, so it feels fast - const url = `${GetBackendUrl()}${ROUTE_CONSTANTS.Recipe(id)}`; + const url = `${window.location.origin}${ROUTE_CONSTANTS.Recipe(id)}`; + + await navigator.clipboard.writeText(url); const result = await EngagementShareRecipe(id);