From 96b6e712ac9a5e4659f1726cffc8f5a3308cb433 Mon Sep 17 00:00:00 2001 From: Haziq Khairi Date: Thu, 11 Jan 2024 20:55:37 +0800 Subject: [PATCH] feat: add artist info in art page --- src/pages/ArtDescription.jsx | 124 +++++++++++++++++++++++------------ 1 file changed, 82 insertions(+), 42 deletions(-) diff --git a/src/pages/ArtDescription.jsx b/src/pages/ArtDescription.jsx index 5eb3910..72b3cf6 100644 --- a/src/pages/ArtDescription.jsx +++ b/src/pages/ArtDescription.jsx @@ -1,6 +1,13 @@ import { useParams } from 'react-router-dom'; import { allLists } from '../data/list'; -import { Card, CardHeader, CardBody, Image } from '@nextui-org/react'; +import { + Card, + CardHeader, + CardBody, + Image, + Tabs, + Tab, +} from '@nextui-org/react'; const ArtDescription = () => { const { id } = useParams(); @@ -28,50 +35,83 @@ const ArtDescription = () => { {/* Info Section */}
- - {/* Card Header */} - -
-

- {artItem.name} -

-

- by {artItem.artistInfo.name} -

-
-
+ + + + {/* Card Header */} + +
+

+ {artItem.name} +

+

+ by {artItem.artistInfo.name} +

+
+
- {/* Card Body */} - -
{artItem.description}
+ {/* Card Body */} + +
{artItem.description}
-
- Year: - {artItem.date} -
-
- Style: - {artItem.style} -
-
- Dimensions: - {artItem.dimensions} -
+
+ Year: + {artItem.date} +
+
+ Style: + {artItem.style} +
+
+ Dimensions: + {artItem.dimensions} +
- {/* Location Detail */} -
- Location: - {artItem.location} - {flagSrc && ( - {artItem.countryCode} - )} -
-
-
+ {/* Location Detail */} +
+ Location: + {artItem.location} + {flagSrc && ( + {artItem.countryCode} + )} +
+ +
+ + + + + {/* Card Header */} + +

+ {artItem.artistInfo.name} +

+
+ + {/* Card Body */} + +
{artItem.artistInfo.bio}
+
+ Birth Year: + {artItem.artistInfo.birthYear} +
+
+ Death Year: + {artItem.artistInfo.deathYear || 'N/A'} +
+
+ Nationality: + {artItem.artistInfo.nationality} +
+ {/* Add other artist information fields here */} +
+
+
+
);