1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-10-01 00:50:10 +02:00
pingvin-share/frontend/src/components/Meta.tsx
2022-10-09 22:30:32 +02:00

28 lines
675 B
TypeScript

import Head from "next/head";
const Meta = ({
title,
description,
}: {
title: string;
description?: string;
}) => {
return (
<Head>
{/* TODO: Doesn't work because script get only executed on client side */}
<title>{title} - Pingvin Share</title>
<meta name="og:title" content={`${title} - Pingvin Share`} />
<meta
name="og:description"
content={
description ?? "An open-source and self-hosted sharing platform."
}
/>
<meta name="twitter:title" content={`${title} - Pingvin Share`} />
<meta name="twitter:description" content={description} />
</Head>
);
};
export default Meta;