Use framework logo on console & trust

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-16 19:05:34 +01:00
parent 427565c521
commit 8c772661bf
34 changed files with 375 additions and 337 deletions

View File

@@ -1,20 +0,0 @@
export const availableFrameworks = [
{
id: "ISO27001-2022",
name: "ISO 27001 (2022)",
logo: "/logos/iso27001.png",
description: "Information security management systems",
},
{
id: "SOC2",
name: "SOC 2",
logo: "/logos/soc2.png",
description: "System and Organization Controls 2",
},
{
id: "HIPAA",
name: "HIPAA",
logo: "/logos/hipaa.png",
description: "Health Insurance Portability and Accountability Act",
},
];

View File

@@ -24,7 +24,6 @@ export {
countries,
type CountryCode,
} from "./countries";
export { availableFrameworks } from "./frameworks";
export {
getDocumentTypeLabel,
documentTypes,
@@ -63,7 +62,7 @@ export {
export { promisifyMutation } from "./relay";
export { fileType, fileSize } from "./file";
export { formatDatetime, formatDate } from "./date";
export { getLogoUrl, getTrustCenterUrl } from "./trustCenter";
export { getTrustCenterUrl } from "./trustCenter";
export { formatError, type GraphQLError } from "./error";
export { Role, getAssignableRoles } from "./roles";
export {

View File

@@ -1,15 +1,3 @@
export function getLogoUrl(logoPath: string): string {
const path = window.location.pathname;
const trustMatch = path.match(/^\/trust\/([^/]+)/);
if (!trustMatch) {
return `/logos/${logoPath}`;
}
const slugOrId = trustMatch[1];
return `/trust/${slugOrId}/logos/${logoPath}`;
}
export function getTrustCenterUrl(path: string): string {
const currentPath = window.location.pathname;
const trustMatch = currentPath.match(/^\/trust\/([^/]+)/);