RESTfulMC/Frontend/src/app/components/embed.tsx
Rainnny7 d46fd443d4
Some checks failed
Deploy Frontend / docker (17, 3.8.5) (push) Failing after 29s
Embed color test
2024-04-19 11:33:29 -04:00

51 lines
850 B
TypeScript

import { Metadata } from "next";
/**
* Props for an embed.
*/
type EmbedProps = {
/**
* The title of the embed.
*/
title: string;
/**
* The description of the embed.
*/
description: string;
/**
* The optional thumbnail image of the embed.
*/
thumbnail?: string;
};
/**
* An embed for a page.
*
* @param props the embed props
* @returns the embed jsx
*/
const Embed = ({
title,
description,
thumbnail = "",
}: EmbedProps): Metadata => {
return {
title: title,
openGraph: {
title: `${title}`,
description: description,
images: [
{
url: thumbnail,
},
],
},
twitter: {
card: "summary",
},
};
};
export default Embed;