refactor: clean function signature

This commit is contained in:
Ben Schlegel 2024-02-23 15:50:43 +01:00
parent e64f2e7e0a
commit 49ccbfab51
No known key found for this signature in database
GPG Key ID: 8BDB8891C1575E22

View File

@ -13,8 +13,10 @@ import { unescapeHTML } from "../util/escape"
* Generates social image (OG/twitter standard) and saves it as `.webp` inside the public folder * Generates social image (OG/twitter standard) and saves it as `.webp` inside the public folder
* @param opts options for generating image * @param opts options for generating image
*/ */
async function generateSocialImage(opts: ImageOptions, userOpts: SocialImageOptions) { async function generateSocialImage(
const { cfg, description, fileName, fontsPromise, title } = opts { cfg, description, fileName, fontsPromise, title }: ImageOptions,
userOpts: SocialImageOptions,
) {
const fonts = await fontsPromise const fonts = await fontsPromise
// JSX that will be used to generate satori svg // JSX that will be used to generate satori svg