mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
fix: resolve public url
This commit is contained in:
@@ -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() {
|
||||
/>
|
||||
</span>
|
||||
<div className="flex md:flex-row flex-col md:items-center">
|
||||
<span className="mb-1 md:mb-1">opensign.me/</span>
|
||||
<span className="mb-1 md:mb-1">
|
||||
{isStaging ? "staging.opensign.me/" : " opensign.me/"}
|
||||
</span>
|
||||
{editmode ? (
|
||||
<input
|
||||
maxLength={40}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useLocation, useNavigate } from "react-router-dom";
|
||||
import axios from "axios";
|
||||
import ModalUi from "./ModalUi";
|
||||
import AddSigner from "../components/AddSigner";
|
||||
import { isEnableSubscription } from "../constant/const";
|
||||
import { isEnableSubscription, isStaging } from "../constant/const";
|
||||
import Alert from "./Alert";
|
||||
import Tooltip from "./Tooltip";
|
||||
import { RWebShare } from "react-web-share";
|
||||
@@ -990,9 +990,16 @@ const ReportTable = (props) => {
|
||||
}
|
||||
};
|
||||
|
||||
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) => {
|
||||
<span
|
||||
onClick={() => copytoProfileLink()}
|
||||
className="underline underline-offset-2 w-[150px] md:w-[350px] whitespace-nowrap overflow-hidden text-ellipsis cursor-pointer"
|
||||
>{`https://opensign.me/${publicUserName}`}</span>
|
||||
>
|
||||
{publicUrl()}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user