Support ID-based trust center URLs with slug fallback

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-13 23:23:08 +02:00
parent a848f81a5c
commit c4c4fda49f
4 changed files with 84 additions and 32 deletions

View File

@@ -157,10 +157,10 @@ export default function TrustCenterPage({ queryRef }: Props) {
});
};
const trustCenterUrl = organization.trustCenter?.slug
const trustCenterUrl = organization.trustCenter?.id
? organization.customDomain?.domain
? `https://${organization.customDomain.domain}`
: `${window.location.origin}/trust/${organization.trustCenter.slug}`
: `${window.location.origin}/trust/${organization.trustCenter.id}`
: null;