Skip to content

Commit 4e67052

Browse files
committed
last commit
1 parent a0cd1f5 commit 4e67052

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SKIP_PREFLIGHT_CHECK=true

src/components/Search/Search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Search = () => {
4040
{
4141
searchList.map((e, i) => (
4242
<Link key={i} to={`/view-page/${e?.id}`} >
43-
<SearchItem key={i} title={e?.title} image_id={e?.image_id} imageHeight={e?.thumbnail?.height} imageWidth={e?.thumbnail?.width} location={e?.place_of_origin} startYear={e?.date_start} endYear={e?.date_end} artistName={e?.artist_title} />
43+
<SearchItem key={i} title={e?.title} alt_text={e?.thumbnail?.alt_text} />
4444
</Link>
4545
))
4646
}

src/components/SearchItem.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22

3-
const SearchItem = ({ title, image_id, imageHeight, imageWidth, location, startYear, endYear, artistName }) => {
3+
const SearchItem = ({ title, image_id }) => {
44

55
const getImage = (imageId) => {
66
if (imageId == null) {
@@ -15,14 +15,8 @@ const SearchItem = ({ title, image_id, imageHeight, imageWidth, location, startY
1515
<div className="flex w-full items-center h-80 overflow-hidden justify-center">
1616
<img src={getImage(image_id)} alt="/" />
1717
</div>
18-
<div className='px-3 py-2'>
19-
<h3 className='font-bold'>{ title } <span className='font-normal'> - { artistName }</span> </h3>
20-
<p className='text-sm'>
21-
{ startYear } - { endYear }
22-
</p>
23-
<p>
24-
{ location }
25-
</p>
18+
<div className='px-3 py-5 mb-3'>
19+
<h3 className='font-bold'>{ title }</h3>
2620
</div>
2721
</div>
2822
)

src/components/ViewPage.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const ViewPage = () => {
88

99
const { artId } = useParams()
1010
const history = useHistory()
11-
console.log(artId);
1211
const { data, isFetching } = useGetArtDetailsQuery({ id:artId });
1312
const artDetails = data?.data;
1413
if (isFetching) {
@@ -45,7 +44,7 @@ const ViewPage = () => {
4544
{ artDetails.title }
4645
</h2>
4746
<p className='text-lg'>
48-
Browse a curated selection of art around the world, including Museum ehibitions, gallery openings, upcoming and many more. Browse a curated selection of art around the world, including museum exhibitions, gallery openings, upcoming and many more. Browse a curated selection of art around the world, including Museum ehibitions, gallery openings, upcoming and many more. Browse a curated selection of art around the world, including museum exhibitions, gallery openings, upcoming and many more.
47+
{ artDetails?.thumbnail?.alt_text }
4948
</p>
5049
</div>
5150
<div className='flex gap-4'>

0 commit comments

Comments
 (0)