From 0ad8bfe15c544f2fe34a7d7b2bc4284dec70a6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20=C3=96brink?= Date: Fri, 17 Sep 2021 11:36:53 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Modified=20used=20for=20?= =?UTF-8?q?child=20overview=20as=20well?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/app/components/childListItem.component.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/app/components/childListItem.component.tsx b/packages/app/components/childListItem.component.tsx index 1bc16f27..ec81d917 100644 --- a/packages/app/components/childListItem.component.tsx +++ b/packages/app/components/childListItem.component.tsx @@ -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 ?? []),