Skip to content

Commit

Permalink
[#26] Fix layout on homepage and date for survey
Browse files Browse the repository at this point in the history
  • Loading branch information
liamstevens111 committed Mar 13, 2023
1 parent d348717 commit 3b51d51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Survey/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ type SurveyProps = {
function Survey({ title, description, coverImageUrl }: SurveyProps) {
return (
<>
<img src={coverImageUrl} alt="cover" />
<img className="my-4 h-full max-h-80 w-full max-w-full" src={coverImageUrl} alt="cover" />
<p className="text-white"> {title}</p>
<p className="text-white"> {description}</p>
<p className="text-white opacity-60"> {description}</p>
</>
);
}
Expand Down
9 changes: 5 additions & 4 deletions src/screens/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ const HomeScreen = (): JSX.Element => {

return (
<>
<div className="my-8 text-white opacity-50" data-test-id="app-main-heading">
Today - Monday, June 15
</div>

{surveys.length > 0 && (
<section>
<div className="my-8 text-white" data-test-id="app-main-heading">
<p>{new Date().toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' })}</p>
<p className="text-3xl font-extrabold">Today</p>
</div>

<SurveyList surveys={surveys} />
</section>
)}
Expand Down

0 comments on commit 3b51d51

Please sign in to comment.