Skip to content

Commit 963e727

Browse files
hh
1 parent 7aede10 commit 963e727

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

components/Yugioh/GridView.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
262262
}
263263
} }
264264
>
265-
<div className="relative min-h-[24rem] w-full overflow-ellipsis rounded-sm border border-white/10 bg-black/40 shadow-lg transition duration-200 group-hover:border-indigo-400/60 dark:border-white/20 dark:bg-gray-900/60">
265+
<div className="relative w-full h-96 flex-wrap rounded-sm border border-white/10 bg-black/40 shadow-lg transition duration-200 group-hover:border-indigo-400/60 dark:border-white/20 dark:bg-gray-900/60">
266266
<img
267-
className="mx-auto aspect-1 min-h-[24rem] w-full object-cover object-top sm:object-scale-down"
267+
className="mx-auto w-full h-full sm:object-fill object-center object-scale-down"
268268
src={ imageSrc }
269269
alt={ `Card Image - ${ card.productName }` }
270270
loading="lazy"
@@ -273,7 +273,7 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
273273
<div className="pointer-events-none absolute inset-x-0 top-0 flex h-full items-end justify-start overflow-hidden rounded-lg p-4">
274274
<div
275275
aria-hidden="true"
276-
className="absolute inset-x-0 bottom-0 h-72 bg-gradient-to-t from-black/80 via-black/30 to-transparent opacity-90"
276+
className="absolute inset-x-0 bottom-0 min-h-[24rem] bg-gradient-to-t from-black/80 via-black/30 to-transparent opacity-90"
277277
/>
278278
<div className="relative flex flex-col gap-1 text-white">
279279
{ formatCurrency( card.marketPrice ) && (
@@ -287,9 +287,9 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
287287
) }
288288
</div>
289289
</div>
290-
<div className="flip-card-back flex h-full min-h-[24rem] flex-col justify-between gap-4 rounded border border-white/10 bg-black/80 p-4 text-white shadow-lg dark:border-white/20 dark:bg-gray-900/80">
290+
<div className="flip-card-back flex flex-col justify-between gap-4 rounded border border-white/10 bg-black/80 p-4 text-white shadow-lg dark:border-white/20 dark:bg-gray-900/80">
291291
<div className="space-y-1">
292-
<h3 className="text-lg font-semibold text-center">{ card.productName }</h3>
292+
<h3 className="text-lg font-semibold text-center text-pretty">{ card.productName }</h3>
293293
<div className="space-y-2 text-sm text-white/80">
294294
{ detailEntries.map( ( entry ) => (
295295
<div key={ entry.label } className="flex items-start justify-between gap-3">
@@ -299,19 +299,19 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
299299
) ) }
300300
</div>
301301
</div>
302-
<div className="flex flex-row mx-auto">
302+
<div className="flex flex-row mx-auto text-pretty">
303303
<Link
304304
href={ {
305305
pathname: "/yugioh/sets/[letter]/cards/card-details",
306306
query: cardDetailsQuery,
307307
} }
308-
className="inline-flex w-full items-center justify-center rounded-md border border-white/20 bg-white/10 px-4 py-2 text-sm font-semibold text-white transition hover:border-indigo-400 hover:bg-indigo-500/20"
308+
className="inline-flex w-full items-center justify-center rounded-md border border-white/20 bg-white/10 px-2 py-1 text-sm font-semibold text-white transition hover:border-indigo-400 hover:bg-indigo-500/20"
309309
>
310310
View Details
311311
</Link>
312312
<button
313313
type="button"
314-
className="inline-flex w-full items-center justify-center rounded-md border border-white/20 px-4 py-2 text-sm font-medium text-white transition hover:border-indigo-400 hover:text-indigo-200"
314+
className="inline-flex w-full items-center justify-center rounded-md border border-white/20 px-2 py-1 text-sm font-medium text-white transition hover:border-indigo-400 hover:text-indigo-200"
315315
onClick={ () => toggleFlip( card._id, false ) }
316316
>
317317
Show Card Front
@@ -321,7 +321,7 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
321321
</div>
322322
</div>
323323
<div className="mt-4 space-y-5 rounded-2xl border border-white/10 bg-white/5 p-4 text-sm text-white/80">
324-
<div className="flex items-center justify-between gap-4">
324+
<div className="flex flex-wrap items-center justify-between gap-4">
325325
<span className="text-xs font-semibold uppercase tracking-wide text-white/60">Quantity</span>
326326
{ edit[ card._id ] === "quantity" ? (
327327
<input
@@ -331,7 +331,7 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
331331
onChange={ ( event ) => handleChange( event, card._id, "quantity" ) }
332332
onBlur={ () => handleSave( card._id, "quantity" ) }
333333
onKeyDown={ handleQuantityKeyDown }
334-
className="w-20 rounded-lg border border-white/30 bg-black/60 px-2 py-1 text-center text-white focus:border-indigo-400 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
334+
className="w-auto rounded-lg border border-white/30 bg-black/60 px-2 py-1 text-center text-white focus:border-indigo-400 focus:outline-none focus:ring-2 focus:ring-indigo-400/60"
335335
min={ 0 }
336336
/>
337337
) : (
@@ -349,7 +349,7 @@ const GridView = ( { aggregatedData, onDeleteCard, onUpdateCard } ) => {
349349
<span className="text-xs font-semibold uppercase tracking-wide text-rose-300">Remove Amount</span>
350350
{ edit[ card._id ] === "deleteAmount" ? (
351351
<input
352-
className="w-20 rounded-lg border border-white/30 bg-black/60 px-2 py-1 text-center text-white focus:border-rose-400 focus:outline-none focus:ring-2 focus:ring-rose-400/60"
352+
className="w-auto rounded-lg border border-white/30 bg-black/60 px-2 py-1 text-center text-white focus:border-rose-400 focus:outline-none focus:ring-2 focus:ring-rose-400/60"
353353
type="number"
354354
min={ 0 }
355355
max={ Math.max( quantity, 0 ) }

middleware.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ const handleUnauthorized = ( request: NextRequest ) => {
8989
}
9090

9191
const redirectUrl = new URL( LOGIN_ROUTE, request.url );
92-
const returnPath = collectReturnPath( request );
93-
if ( returnPath ) {
94-
redirectUrl.searchParams.set( "from", returnPath );
95-
}
9692

9793
const response = NextResponse.redirect( redirectUrl );
9894
clearAuthenticatedCookie( response );

0 commit comments

Comments
 (0)