-
Notifications
You must be signed in to change notification settings - Fork 353
Expand file tree
/
Copy pathstructured-data.component.tsx
More file actions
34 lines (32 loc) · 1.29 KB
/
structured-data.component.tsx
File metadata and controls
34 lines (32 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from "react";
import { ArticleStructuredDataModel } from "@/features/seo/models/article-structured-data.model";
import { BreadcrumbStructuredDataModel } from "@/features/seo/models/breadcrumb-structured-data.model";
import { HowToStructuredDataModel } from "@/features/seo/models/how-to-structured-data.model";
import { WebsiteStructuredDataModel } from "@/features/seo/models/website-structured-data.model";
import { OrganizationStructuredDataModel } from "@/features/seo/models/organization-structured-data.model";
import { FaqStructuredDataModel } from "@/features/seo/models/faq-structured-data.model";
interface StructuredDataProps {
data:
| ArticleStructuredDataModel
| BreadcrumbStructuredDataModel
| HowToStructuredDataModel
| OrganizationStructuredDataModel
| FaqStructuredDataModel
| Array<
| ArticleStructuredDataModel
| BreadcrumbStructuredDataModel
| HowToStructuredDataModel
| WebsiteStructuredDataModel
| OrganizationStructuredDataModel
| FaqStructuredDataModel
>;
}
export const StructuredData: React.FC<StructuredDataProps> = ({ data }) => {
return (
<script
key="structured-data"
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
/>
);
};