Skip to content

Commit

Permalink
Merge pull request #5 from ymuichiro:bug-fix
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
ymuichiro committed Nov 12, 2023
2 parents 55f78d5 + a5e0b6c commit 5c26dc1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pages/community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ const Community: NextPage<Props> = ({ i18n, communityReleases, spaces, locale })

const getServerSideProps: GetServerSideProps<Props> = async ({ locale, defaultLocale }) => {
const articles = await findCommunityRelease(locale, { isIncludeMedia: true, page: 1 });
articles.data = articles.data
.map((article) => {
article.attributes.body = 'deleted';
article.attributes.localizations.data = [];
return article;
})
.slice(0, 20);
articles.data = articles.data.map((article) => {
article.attributes.body = 'deleted';
article.attributes.localizations.data = [];
return article;
});
const spaceArticles = await findSpaceRelease(locale, { isIncludeMedia: true });
const spaces = [...spaceArticles.data].reverse();
return {
Expand Down

0 comments on commit 5c26dc1

Please sign in to comment.