From a0cbaeee027c6157cce731cebfc143a154229a1b Mon Sep 17 00:00:00 2001 From: Haziq Khairi Date: Thu, 11 Jan 2024 23:39:07 +0800 Subject: [PATCH] chore: update styling and conditional death year --- src/pages/ArtDescription.jsx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/pages/ArtDescription.jsx b/src/pages/ArtDescription.jsx index 4aeb382..e3426f5 100644 --- a/src/pages/ArtDescription.jsx +++ b/src/pages/ArtDescription.jsx @@ -37,13 +37,9 @@ const FlagImage = ({ countryCode }) => { const ArtInfo = ({ artItem }) => ( - -
-

{artItem.name}

-

- by {artItem.artistInfo.name} -

-
+ +

{artItem.name}

+

by {artItem.artistInfo.name}

{artItem.description}

@@ -67,9 +63,10 @@ const ArtInfo = ({ artItem }) => (
); + const ArtistDetails = ({ artistInfo }) => ( - + {artistInfo.name} ( />

{artistInfo.name}

-
+
{artistInfo.nationality}
@@ -92,10 +89,12 @@ const ArtistDetails = ({ artistInfo }) => ( Birth Year: {artistInfo.birthYear}

-

- Death Year: - {artistInfo.deathYear || 'N/A'} -

+ {artistInfo.deathYear && ( +

+ Death Year: + {artistInfo.deathYear} +

+ )}

Notable Works: {artistInfo.notableWorks.join(', ')}