diff --git a/client/src/Pages/StatusPage/Status/index.tsx b/client/src/Pages/StatusPage/Status/index.tsx index 6aed8817b..834228843 100644 --- a/client/src/Pages/StatusPage/Status/index.tsx +++ b/client/src/Pages/StatusPage/Status/index.tsx @@ -17,6 +17,7 @@ import { } from "@/Types/StatusPage"; import { buildStatusPageApiPath, + getStatusPagePreviewUrl, getStatusPagePublicUrl, isCustomDomainHost, } from "@/Utils/statusPageUrl"; @@ -142,6 +143,7 @@ const StatusPageView = () => { } const publicUrl = getStatusPagePublicUrl(statusPage); + const previewUrl = getStatusPagePreviewUrl(statusPage); return ( { ): string => { + if (typeof window !== "undefined") { + return `${window.location.origin}${PUBLIC_STATUS_PAGE_PREFIX}/${statusPage.url}`; + } + + return `${PUBLIC_STATUS_PAGE_PREFIX}/${statusPage.url}`; +}; + export const buildStatusPageApiPath = (options: { url?: string; useCustomDomain?: boolean;