Display URL host on compliance page organization sidebar ENG-53
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Changed
|
||||
|
||||
- Remove query params from compliange page sidebar website displayed URLs
|
||||
|
||||
## [0.116.11] - 2026-01-27
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { domain, formatError } from "@probo/helpers";
|
||||
import { formatError } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
Button,
|
||||
@@ -109,7 +109,7 @@ export function OrganizationSidebar({
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<span className="text-txt-info hover:underline ">
|
||||
{domain(trustCenter.organization.websiteUrl)}
|
||||
{new URL(trustCenter.organization.websiteUrl).host}
|
||||
</span>
|
||||
</a>
|
||||
</BusinessInfo>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export { objectKeys, objectEntries, cleanFormData } from "./object";
|
||||
export { sprintf, faviconUrl, slugify, domain } from "./string";
|
||||
export { sprintf, faviconUrl, slugify } from "./string";
|
||||
export {
|
||||
getCustomDomainStatusBadgeLabel,
|
||||
getCustomDomainStatusBadgeVariant,
|
||||
|
||||
@@ -30,11 +30,3 @@ export function slugify(str: string): string {
|
||||
.replace(/[^a-z0-9 ]/g, "") // remove all chars not letters, numbers and spaces (to be replaced)
|
||||
.replace(/\s+/g, "-");
|
||||
}
|
||||
|
||||
export function domain(url: string): string {
|
||||
const parts = url.split("//");
|
||||
if (parts.length > 1) {
|
||||
url = parts[1];
|
||||
}
|
||||
return url.split("/")[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user