From 0af094770c4ebabc56ff761a8bd215bc397c0f7e Mon Sep 17 00:00:00 2001 From: João Augusto Costa Branco Marado Torres Date: Tue, 5 Aug 2025 18:50:37 +0100 Subject: refactor: reading page review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Augusto Costa Branco Marado Torres --- src/components/Citations.astro | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/components/Citations.astro') diff --git a/src/components/Citations.astro b/src/components/Citations.astro index ff42ad4..7ae6b26 100644 --- a/src/components/Citations.astro +++ b/src/components/Citations.astro @@ -1,9 +1,8 @@ --- -import type { CollectionEntry } from "astro:content"; -import { getEntries } from "astro:content"; +import type { BlogPosting } from "@lib/collection/types"; -type Props = { citations: CollectionEntry<"blog">["data"]["relatedPosts"] }; -const citations = await getEntries(Astro.props.citations ?? []); +type Props = { citations: BlogPosting[] }; +const { citations } = Astro.props; --- { citations.length > 0 && @@ -12,15 +11,15 @@ const citations = await getEntries(Astro.props.citations ?? []);

O autor recomenda ler também: