Files
Frontend/src/common/embed-fallback.ts

24 lines
478 B
TypeScript
Raw Normal View History

import { Metadata } from "next";
type Fallback = {
title: string;
description: string;
};
/**
* Generates metadata for a fallback embed.
*
* @param title the title of the embed
* @param description the description of the embed
* @returns the metadata for the embed
*/
export function embedFallback({ title, description }: Fallback): Metadata {
return {
title: `${title}`,
openGraph: {
title: `${title}`,
description: description,
},
};
}