Skip to content

Commit 942ea6d

Browse files
hh
1 parent 738db68 commit 942ea6d

3 files changed

Lines changed: 315 additions & 65 deletions

File tree

components/Yugioh/YugiohCardDataTable.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ const YugiohCardDataTable = ( { matchedCardData, setMatchedCardData } ) => {
156156
rarity: card?.rarity,
157157
condition: card?.condition,
158158
marketPrice: data?.marketPrice,
159-
lowPrice: data?.lowPrice,
160159
quantity: 1,
161160
} ) );
162161

@@ -189,7 +188,7 @@ const YugiohCardDataTable = ( { matchedCardData, setMatchedCardData } ) => {
189188
setNotification( { show: true, message: 'No cards selected to download!' } );
190189
return;
191190
}
192-
const headers = [ "Name", "Set", "Number", "Printing", "Rarity", "Condition", "Market Price", "Low Price" ];
191+
const headers = [ "Name", "Set", "Number", "Printing", "Rarity", "Condition", "Market Price" ];
193192
const rows = matchedCardData
194193
.filter( ( _, index ) => selectedKeys.has( itemUniqueIds[ index ] ) )
195194
.map( ( { card, data } ) => [
@@ -200,7 +199,6 @@ const YugiohCardDataTable = ( { matchedCardData, setMatchedCardData } ) => {
200199
card?.rarity,
201200
card?.condition,
202201
data?.marketPrice,
203-
data?.lowPrice,
204202
] );
205203
const csvBody = headers.join( "|" ) + "\n" +
206204
rows.map( ( r ) => r.map( ( v ) => `"${ v }"` ).join( "|" ) ).join( "\n" );
@@ -277,7 +275,6 @@ const YugiohCardDataTable = ( { matchedCardData, setMatchedCardData } ) => {
277275
{ key: 'rarity', label: 'Rarity' },
278276
{ key: 'condition', label: 'Condition' },
279277
{ key: 'marketPrice', label: 'Market Price' },
280-
{ key: 'lowPrice', label: 'Low Price' },
281278
].map( ( { key, label } ) => (
282279
<th
283280
key={ key }
@@ -299,42 +296,39 @@ const YugiohCardDataTable = ( { matchedCardData, setMatchedCardData } ) => {
299296
</tr>
300297
</thead>
301298

302-
<tbody className="bg-white divide-y divide-gray-300 text-black px-1 py-1 mx-auto">
299+
<tbody className=" glass text-shadow divide-y divide-gray-300 text-white px-1 py-1 mx-auto">
303300
{ sortedAndPaginatedData.currentItems.map( ( { item, originalIndex } ) => {
304301
const uniqueId = itemUniqueIds[ originalIndex ];
305302
const isSelected = selectedKeys.has( uniqueId );
306303
const { card, data } = item;
307304

308305
return (
309-
<tr key={ uniqueId } className="hover:bg-gray-100">
306+
<tr key={ uniqueId } className="hover:bg-gray-600">
310307
<td className="text-center border border-gray-300">
311308
<input
312309
type="checkbox"
313310
checked={ isSelected }
314311
onChange={ ( e ) => toggleCheckbox( e, uniqueId ) }
315312
/>
316313
</td>
317-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
314+
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-white hover:bg-black hover:text-white">
318315
{ card?.productName || 'N/A' }
319316
</td>
320-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
317+
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-white hover:bg-black hover:text-white">
321318
{ card?.setName || 'N/A' }
322319
</td>
323-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
320+
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-white hover:bg-black hover:text-white">
324321
{ card?.number || 'N/A' }
325322
</td>
326-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
323+
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-white hover:bg-black hover:text-white">
327324
{ card?.rarity || 'N/A' }
328325
</td>
329-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
326+
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-white hover:bg-black hover:text-white">
330327
{ card?.condition || 'N/A' }
331328
</td>
332-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
329+
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-white hover:bg-black hover:text-white">
333330
{ formatPrice( data?.marketPrice ) }
334331
</td>
335-
<td className="p-2 text-center border-t border-gray-100 text-xs lg:text-sm sm:text-left text-black hover:bg-black hover:text-white">
336-
{ formatPrice( data?.lowPrice ) }
337-
</td>
338332
</tr>
339333
);
340334
} ) }

pages/yugioh/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,23 +394,23 @@ const MyCollection = () => {
394394
<div className='float-left w-1/2'>
395395
<button
396396
onClick={ () => setViewMode( 'grid' ) }
397-
className={ `p-3 transition-colors ${ viewMode === 'grid'
397+
className={ `px-3 py-3 transition-colors ${ viewMode === 'grid'
398398
? 'bg-purple-600 text-white'
399399
: 'text-white/60 hover:text-white hover:bg-white/10'
400400
}` }
401401
>
402-
<Grid size={ 16 } />
402+
<Grid size={ 24 } />
403403
</button>
404404
</div>
405405
<div className='float-right w-1/2'>
406406
<button
407407
onClick={ () => setViewMode( 'table' ) }
408-
className={ `p-3 transition-colors ${ viewMode === 'table'
408+
className={ `px-3 py-3 transition-colors ${ viewMode === 'table'
409409
? 'bg-purple-600 text-white'
410410
: 'text-white/60 hover:text-white hover:bg-white/10'
411411
}` }
412412
>
413-
<List size={ 16 } />
413+
<List size={ 24 } />
414414
</button>
415415
</div>
416416
</div>
@@ -472,6 +472,7 @@ const MyCollection = () => {
472472

473473
</>
474474
) : (
475+
!isAuthenticated &&
475476
<div className="text-center py-16">
476477
<h2 className="text-2xl font-bold mb-4">Please Log In</h2>
477478
<p className="text-white/80 mb-8">You need to be logged in to view your collection.</p>

0 commit comments

Comments
 (0)