Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Sep 11, 2024
1 parent 3d91077 commit 5205f02
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions clientv2/src/pages/recruiter/RecruiterHome.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ export function RecruiterHomePage() {
setLoading(false);
return showErrorNotification();
}
const sortedData = response.data.sort((
a: Record<string, string>,
b: Record<string, string>
) => {
const keyA = a.name.toLowerCase();
const sortedData = response.data.sort(
(a: Record<string, string>, b: Record<string, string>) => {
const keyA = a.name.toLowerCase();
const keyB = b.name.toLowerCase();
if (keyA < keyB) return -1;
if (keyA > keyB) return 1;
return 0;
});
if (keyA < keyB) return -1;
if (keyA > keyB) return 1;
return 0;
}
);
setApiResponse(sortedData);
setLoading(false);
return undefined;
Expand Down

0 comments on commit 5205f02

Please sign in to comment.