0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-29 01:28:59 -05:00
pingvin-share/frontend/src/components/Meta.tsx
Elias Schneider fddad3ef70
feat: custom branding (#112)
* add first concept

* remove setup status

* split config page in multiple components

* add custom branding docs

* add test email button

* fix invalid email from header

* add migration

* mount images to host

* update docs

* remove unused endpoint

* run formatter
2023-03-04 23:29:00 +01:00

31 lines
693 B
TypeScript

import Head from "next/head";
import useConfig from "../hooks/config.hook";
const Meta = ({
title,
description,
}: {
title: string;
description?: string;
}) => {
const config = useConfig();
const metaTitle = `${title} - ${config.get("general.appName")}`;
return (
<Head>
<title>{metaTitle}</title>
<meta name="og:title" content={metaTitle} />
<meta
name="og:description"
content={
description ?? "An open-source and self-hosted sharing platform."
}
/>
<meta name="twitter:title" content={metaTitle} />
<meta name="twitter:description" content={description} />
</Head>
);
};
export default Meta;