💂♂️ fixed lint and prittier
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
interface BreadcrumbSchemaItem {
|
||||
position: number;
|
||||
name: string;
|
||||
item: string;
|
||||
position: number
|
||||
name: string
|
||||
item: string
|
||||
}
|
||||
|
||||
export function BreadcrumbsSchema({ items }: { items: BreadcrumbSchemaItem[] }) {
|
||||
const structuredData = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'BreadcrumbList',
|
||||
itemListElement: items.map((item) => ({
|
||||
itemListElement: items.map(item => ({
|
||||
'@type': 'ListItem',
|
||||
position: item.position,
|
||||
name: item.name,
|
||||
item: `http://localhost:3000${item.item}`,
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
|
||||
/>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user