Use framework logo on console & trust
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -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",
|
||||
},
|
||||
];
|
||||
@@ -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 {
|
||||
|
||||
@@ -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\/([^/]+)/);
|
||||
|
||||
Reference in New Issue
Block a user