Files
e-tib.com/components/JsonLd.tsx
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

55 lines
1.4 KiB
TypeScript

import { Thing, WithContext } from 'schema-dts';
interface JsonLdProps {
id?: string;
data?: WithContext<Thing> | WithContext<Thing>[];
}
export default function JsonLd({ id, data }: JsonLdProps) {
// If data is provided, use it. Otherwise, use the default Organization + WebSite schema.
const schemaData = data || [
{
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'E-TIB GmbH',
url: 'https://e-tib.com',
logo: 'https://e-tib.com/assets/logo.png',
sameAs: [
'https://www.instagram.com/me.and.eloise/',
],
description: 'Ihr Partner für Kabelleitungstiefbau, Horizontalspülbohrungen, Planung und Vermessung.',
address: {
'@type': 'PostalAddress',
streetAddress: 'Gewerbestraße 22',
addressLocality: 'Guben',
postalCode: '03172',
addressCountry: 'DE',
},
},
{
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'E-TIB',
url: 'https://e-tib.com',
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: 'https://e-tib.com/search?q={search_term_string}',
},
'query-input': 'required name=search_term_string',
},
}
];
return (
<script
id={id}
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify(schemaData),
}}
/>
);
}