From c453589d67b0ab878fbae0ff59d62e0d43b57ac2 Mon Sep 17 00:00:00 2001 From: alex-slobodian Date: Mon, 20 May 2024 19:18:37 +0300 Subject: [PATCH] Fix sort title direction change --- src/components/certificates-list/CertificatesList.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/certificates-list/CertificatesList.tsx b/src/components/certificates-list/CertificatesList.tsx index e7f0db25..9d043ffc 100644 --- a/src/components/certificates-list/CertificatesList.tsx +++ b/src/components/certificates-list/CertificatesList.tsx @@ -80,11 +80,7 @@ export const CertificatesList: React.FunctionComponent< onClick={() => onSort( name, - currentSortName === name - ? currentSortDir === "asc" - ? "desc" - : "asc" - : "asc" + currentSortName === name && currentSortDir === "asc" ? "desc" : "asc" ) } >