From e28553cbbe330b1f9bf8618cdc538d3913e3e42d Mon Sep 17 00:00:00 2001 From: collinmurd Date: Sun, 13 Oct 2024 11:36:42 -0400 Subject: [PATCH] fix default sort direction --- src/app/table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/table.tsx b/src/app/table.tsx index 5c8bf27..4d0e83b 100644 --- a/src/app/table.tsx +++ b/src/app/table.tsx @@ -23,7 +23,7 @@ export function ScoresTable(props: {data: ScoresTableData[]}) { const searchParams = useSearchParams(); const [currentSort, setCurrentSort] = useState({ key: (!searchParams.get('sort') || searchParams.get('sort') === 'score') ? 'score' : 'proj', - desc: searchParams.get('dir') === 'desc' + desc: searchParams.get('dir') ? searchParams.get('dir') === 'desc' : true }); let pathName = usePathnameWithBasepath(); if (pathName.endsWith('/')) {