You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import type { ArenaCrumb } from './Api.generated';
export function arenaBreadcrumbList(items: readonly ArenaCrumb[], origin?: string): string {
const element = (crumb: ArenaCrumb, index: number) => {
const entry: Record<string, unknown> = {
'@type': 'ListItem', position: index + 1, name: crumb.label,
};
if (crumb.href) entry['item'] = origin ? new url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fdravensoft-dev%2Farena%2Fblob%2Fdevelop%2Fframeworks%2Fangular%2Fcrumb.href%2C%2520origin).href : crumb.href;
return entry;
};
return arenaEscapeJsonLd(JSON.stringify({
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: items.map(element),
}));
}
export function arenaEscapeJsonLd(json: string): string {