refactor(talks): use flatMap and size methods
This commit is contained in:
parent
217e98b7e3
commit
ee4f48abcd
|
@ -5,10 +5,8 @@ import PageLayout from '../../layouts/PageLayout.astro'
|
|||
const talks = await Astro.glob("../../talks/*.md")
|
||||
|
||||
const talkCount = _(talks)
|
||||
.map((talk) => talk.frontmatter.events)
|
||||
.flatten()
|
||||
.value()
|
||||
.length
|
||||
.flatMap((talk) => talk.frontmatter.events)
|
||||
.size()
|
||||
|
||||
const sortedTalks = talks
|
||||
.map(talk => {
|
||||
|
|
Loading…
Reference in a new issue