From ba09576b7bf0631c38050fc535a0438aeab061da Mon Sep 17 00:00:00 2001 From: Liam Stevens <8955671+liamstevens111@users.noreply.github.com> Date: Mon, 13 Mar 2023 14:40:33 +0700 Subject: [PATCH] [#26] Fix layout on homepage and date for survey --- src/components/Survey/index.tsx | 4 ++-- src/screens/Home/index.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/Survey/index.tsx b/src/components/Survey/index.tsx index ed3d65d..d659237 100644 --- a/src/components/Survey/index.tsx +++ b/src/components/Survey/index.tsx @@ -7,9 +7,9 @@ type SurveyProps = { function Survey({ title, description, coverImageUrl }: SurveyProps) { return ( <> - cover + cover

{title}

-

{description}

+

{description}

); } diff --git a/src/screens/Home/index.tsx b/src/screens/Home/index.tsx index dba5949..dd77ae6 100644 --- a/src/screens/Home/index.tsx +++ b/src/screens/Home/index.tsx @@ -41,12 +41,13 @@ const HomeScreen = (): JSX.Element => { return ( <> -
- Today - Monday, June 15 -
- {surveys.length > 0 && (
+
+

{new Date().toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' })}

+

Today

+
+
)}