From f4466dc3250e710c0f21c73b700059bf3601c1b4 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Fri, 9 Aug 2024 15:41:35 +0530 Subject: [PATCH] fix: resolve public url --- apps/OpenSign/src/pages/UserProfile.js | 6 ++++-- apps/OpenSign/src/primitives/GetReportDisplay.js | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/OpenSign/src/pages/UserProfile.js b/apps/OpenSign/src/pages/UserProfile.js index 0ef940688..df42f0e0b 100644 --- a/apps/OpenSign/src/pages/UserProfile.js +++ b/apps/OpenSign/src/pages/UserProfile.js @@ -7,7 +7,7 @@ import Title from "../components/Title"; import sanitizeFileName from "../primitives/sanitizeFileName"; import axios from "axios"; import Tooltip from "../primitives/Tooltip"; -import { isEnableSubscription } from "../constant/const"; +import { isEnableSubscription, isStaging } from "../constant/const"; import { checkIsSubscribed, checkIsSubscribedTeam, @@ -476,7 +476,9 @@ function UserProfile() { />
- opensign.me/ + + {isStaging ? "staging.opensign.me/" : " opensign.me/"} + {editmode ? ( { } }; + const publicUrl = () => { + const subDomain = isStaging + ? `https://staging.opensign.me/` + : `https://opensign.me/`; + const url = `${subDomain}${publicUserName}`; + return url; + }; // function to copy public profile links const copytoProfileLink = () => { - const url = `https://opensign.me/${publicUserName}`; + const url = publicUrl(); copytoData(url); setIsAlert(true); setAlertMsg({ @@ -1326,7 +1333,9 @@ const ReportTable = (props) => { copytoProfileLink()} className="underline underline-offset-2 w-[150px] md:w-[350px] whitespace-nowrap overflow-hidden text-ellipsis cursor-pointer" - >{`https://opensign.me/${publicUserName}`} + > + {publicUrl()} +
) : (