feat: 🎸 Modified used for child overview as well

This commit is contained in:
Johan Öbrink 2021-09-17 11:36:53 +02:00
parent 9efef8dad9
commit 0ad8bfe15c
1 changed files with 4 additions and 3 deletions

View File

@ -56,9 +56,10 @@ export const ChildListItem = ({ child, color }: ChildListItemProps) => {
dateCreated ? moment(dateCreated).isSame(moment(), 'week') : false
)
const newsThisWeek = news.filter(({ published }) =>
published ? moment(published).isSame(moment(), 'week') : false
)
const newsThisWeek = news.filter(({ modified, published }) => {
const date = modified || published
return date ? moment(date).isSame(moment(), 'week') : false
})
const scheduleAndCalendarThisWeek = [
...(calendar ?? []),