Skip to content

Commit bdae341

Browse files
committed
bug(frontend): Fixed audits table sorting for status column
1 parent 68a7173 commit bdae341

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

apps/frontend/src/components/AuditsTable.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ export const AuditsTable = ({ audits, isLoading }: auditsTableProps) => {
5959
const columns = useMemo<ColumnDef<Audit>[]>(
6060
() => [
6161
{
62-
accessorFn: (row) => row.scans[0]?.status,
62+
accessorFn: (row) => (row.scans[0]?.status === "processing" ? 1 : 0),
6363
id: "status",
6464
header: "Status",
65-
cell: ({ getValue }) => {
66-
const status = getValue() as string | undefined;
67-
if (status === "processing") {
65+
sortingFn: "basic",
66+
cell: ({ row }) => {
67+
if (row.original.scans[0]?.status === "processing") {
6868
return (
6969
<span role="img" aria-label="Processing">
7070
<GrPowerCycle className={styles.spinning} />

0 commit comments

Comments
 (0)