--- import { APP_BLOG_CONFIG } from "~/utils/config"; import Grid from "~/components/blog/Grid.astro"; import { getBlogPermalink } from "~/utils/permalinks"; import { findPostsByIds } from "~/utils/blog"; import WidgetWrapper from "~/components/ui/WidgetWrapper.astro"; import type { Widget } from "~/types"; export interface Props extends Widget { title?: string; linkText?: string; linkUrl?: string | URL; information?: string; postIds: string[]; } const { title = await Astro.slots.render("title"), linkText = "View all posts", linkUrl = getBlogPermalink(), information = await Astro.slots.render("information"), postIds = [], id, isDark = false, classes = {}, bg = await Astro.slots.render("bg"), } = Astro.props; const posts = APP_BLOG_CONFIG.isEnabled ? await findPostsByIds(postIds) : []; --- { APP_BLOG_CONFIG.isEnabled ? (
{title && (

{APP_BLOG_CONFIG.list.isEnabled && linkText && linkUrl && ( {linkText} ยป )}

)} {information &&

}

) : ( ) }