(key: string)
| 23 | const [sortDirection, setSortDirection] = useState<SortDirection>(initialDirection); |
| 24 | |
| 25 | const handleSort = (key: string) => { |
| 26 | setSortDirection(sortBy === key && sortDirection === "asc" ? "desc" : "asc"); |
| 27 | setSortBy(key); |
| 28 | }; |
| 29 | |
| 30 | const sorted = useMemo(() => { |
| 31 | if (!sortBy) return data; |
nothing calls this directly
no outgoing calls
no test coverage detected