Skip to content

Commit

Permalink
Show the last 10 posts on Patreon only
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaadh committed Jun 13, 2024
1 parent e0f24e7 commit 2e1635e
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions components/components/patreon/patreon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,21 @@ const PatreonLatestPosts: NextPage<PatreonLatestPostsProps> = ({
))}
{posts &&
posts.length > 0 &&
posts.map((post, index) => (
<PatreonPost
key={index}
title={post.attributes.title}
content={post.attributes.content}
embed_data={post.attributes.embed_data}
embed_url={post.attributes.embed_url}
published_at={post.attributes.published_at}
url={post.attributes.url}
is_paid={post.attributes.is_paid}
is_public={post.attributes.is_public}
/>
))}
posts
.slice(0, 10)
.map((post, index) => (
<PatreonPost
key={index}
title={post.attributes.title}
content={post.attributes.content}
embed_data={post.attributes.embed_data}
embed_url={post.attributes.embed_url}
published_at={post.attributes.published_at}
url={post.attributes.url}
is_paid={post.attributes.is_paid}
is_public={post.attributes.is_public}
/>
))}
</div>
);
};
Expand Down

0 comments on commit 2e1635e

Please sign in to comment.