Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
fix getURL for share
Francis Cao7514af42362e
diff --git a/src/app/(main)/websites/[websiteId]/settings/ShareEditForm.tsx b/src/app/(main)/websites/[websiteId]/settings/ShareEditForm.tsxindex 00598fcfd..a71a49277 100644--- a/src/app/(main)/websites/[websiteId]/settings/ShareEditForm.tsx+++ b/src/app/(main)/websites/[websiteId]/settings/ShareEditForm.tsx@@ -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(() => {diff --git a/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx b/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsxindex e997d2476..52f8a0579 100644--- a/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx+++ b/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx@@ -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 (