Skip to content

Commit

Permalink
fix: find proper index-page
Browse files Browse the repository at this point in the history
  • Loading branch information
samipe committed Sep 2, 2024
1 parent 18a68f4 commit cdad016
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export default {
computed: {
...mapState(useStore, ['pages']),
sections() {
return this.pages[0].fields.pageBody.content
const page = this.pages.find((p) => p.fields.pageName === '2025') ?? this.pages[0]
return page.fields.pageBody.content
.filter((c) => c.nodeType === 'embedded-entry-block')
.map((c) => c)
}
Expand Down Expand Up @@ -94,7 +95,7 @@ export default {
}
if (type === 'sponsor') {
const {sponsorName, sponsorTier, href, sponsorLogo} = target.fields
return h(SponsorItem, {href, name: sponsorName, src: sponsorLogo?.fields?.file?.url, important: sponsorTier})
return h(SponsorItem, {href, name: sponsorName, src: sponsorLogo?.fields?.file?.url, important: !!sponsorTier})
}
return ''
Expand Down

0 comments on commit cdad016

Please sign in to comment.