import React from "react"; import Helmet from "react-helmet"; import { CookieBar } from "../Cookiebar/CookieBar"; import * as styles from "./Layout.module.scss"; import { useSiteMetadata } from "@/hooks"; interface Props { title: string; description?: string; socialImage?: string; children: React.ReactNode; noIndex?: boolean; } const Layout: React.FC = ({ children, title, description, socialImage = "", noIndex = false, }: Props) => { const { author, url } = useSiteMetadata(); const metaImage = socialImage || author.photo; const metaImageUrl = url + metaImage; return (
{title} {noIndex && } {children}
); }; export default Layout;