Skip to content

Commit ce54fe4

Browse files
committed
fix dataset sort
1 parent e4ce432 commit ce54fe4

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

app/[locale]/(user)/components/ListingComponent.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,15 @@ const ListingComponent: React.FC<ListingProps> = ({
299299
{categoryName}
300300
</Text>
301301
)}
302-
303-
<Text
304-
variant="headingLg"
305-
fontWeight="regular"
306-
>
307-
{categoryDescription
308-
? categoryDescription
309-
: 'No Description Provided'}
310-
</Text>
311-
</div>
312-
</div>
313-
)}
314302

303+
<Text variant="headingLg" fontWeight="regular">
304+
{categoryDescription
305+
? categoryDescription
306+
: 'No Description Provided'}
307+
</Text>
308+
</div>
309+
</div>
310+
)}
315311

316312
{/* Optional Header Component */}
317313
{headerComponent}
@@ -357,7 +353,11 @@ const ListingComponent: React.FC<ListingProps> = ({
357353
<Button
358354
onClick={() =>
359355
handleOrderChange(
360-
queryParams.order === 'asc' ? 'desc' : 'asc'
356+
queryParams.order === ''
357+
? 'desc'
358+
: queryParams.order === 'desc'
359+
? 'asc'
360+
: 'desc'
361361
)
362362
}
363363
kind="tertiary"
@@ -367,7 +367,7 @@ const ListingComponent: React.FC<ListingProps> = ({
367367
<Icon
368368
source={Icons.sort}
369369
className={cn(
370-
queryParams.order === 'asc' && 'scale-x-[-1]'
370+
queryParams.order === 'desc' && 'scale-x-[-1]'
371371
)}
372372
/>
373373
</Button>

0 commit comments

Comments
 (0)