fix getURL for share
Some checks are pending
Node.js CI / build (push) Waiting to run

This commit is contained in:
Francis Cao 2026-02-05 10:51:51 -08:00
parent 397796cfff
commit 7514af4236
2 changed files with 8 additions and 2 deletions

View file

@ -40,7 +40,10 @@ export function ShareEditForm({
const isEditing = !!shareId;
const getUrl = (slug: string) => {
return `${cloudMode ? process.env.cloudUrl : window?.location.origin}${process.env.basePath || ''}/share/${slug}`;
if (cloudMode) {
return `${process.env.cloudUrl}/share/${slug}`;
}
return `${window?.location.origin}${process.env.basePath || ''}/share/${slug}`;
};
useEffect(() => {

View file

@ -11,7 +11,10 @@ export function SharesTable(props: DataTableProps) {
const { isMobile } = useMobile();
const getUrl = (slug: string) => {
return `${cloudMode ? process.env.cloudUrl : window?.location.origin}${process.env.basePath || ''}/share/${slug}`;
if (cloudMode) {
return `${process.env.cloudUrl}/share/${slug}`;
}
return `${window?.location.origin}${process.env.basePath || ''}/share/${slug}`;
};
return (