Skip to content

Commit d5b3e06

Browse files
hh
1 parent caf4149 commit d5b3e06

6 files changed

Lines changed: 430 additions & 399 deletions

File tree

components/Yugioh/Card.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useCallback } from 'react';
55

66
const Card = ( { cardData } ) => {
77
const router = useRouter();
8-
const { letter, setName } = router.query; // only these two from URL
8+
const { letter, setName, productName } = router.query; // only these two from URL
99

1010
const getLocalImagePath = useCallback(
1111
( cardId ) => `/images/yugiohImages/${ String( cardId ) }.jpg`, []
@@ -18,25 +18,23 @@ const Card = ( { cardData } ) => {
1818
pathname: "/yugioh/sets/[letter]/cards/card-details",
1919
query: {
2020
card: cardData.id,
21-
letter,
21+
letter: letter,
2222
set_name: setName, // only set name passed
2323
},
2424
} }
2525
>
2626

2727

28-
<div className="hover:scale-105 hover:duration-100 transition-transform">
29-
<Image
28+
<div className="hover:scale-95 hover:duration-100 transition-transform">
29+
<img
3030
className="object-scale-down object-center w-full h-full max-h-96"
31-
3231
as="image"
33-
quality={ 75 }
34-
priority={ true }
35-
unoptimized={ true }
32+
priority="true"
33+
unoptimized="true"
3634
src={ getLocalImagePath( cardData.id ) }
3735
alt={ `Card Image - ${ cardData.productName }` }
38-
width={ 1600 }
39-
height={ 1600 }
36+
width="auto"
37+
height="auto"
4038
/>
4139
</div>
4240
</Link>

components/Yugioh/GridView.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import cardData from '@/public/card-data/Yugioh/card_data.json';
77

88
const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
99
const router = useRouter();
10-
const { cardId, card, setName, letter, lowPrice, ebay_price } = router.query;
10+
const { productName, cardId, card, setName, letter, lowPrice, ebay_price } = router.query;
1111
const [ edit, setEdit ] = useState( {} );
1212
const [ editValues, setEditValues ] = useState( {} );
1313
const [ notification, setNotification ] = useState( { show: false, message: '' } );
@@ -156,15 +156,16 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
156156
>
157157
{/* FRONT */ }
158158
<div className="flip-card-front">
159-
<Image
159+
<img
160160
className="w-full h-96 aspect-auto object-scale-down object-center"
161161
as="image"
162-
priority
163-
unoptimized={ true }
162+
priority="true"
163+
unoptimized="true"
164164
src={ cardImages ? cardImages.full : '/images/yugioh-card.png' }
165165
alt={ `${ card.productName }` }
166166
width={ 1600 }
167-
height={ 1600 } />
167+
height={ 1600 }
168+
/>
168169
</div>
169170

170171
{/* BACK */ }

0 commit comments

Comments
 (0)