MCPcopy Create free account
hub / github.com/code100x/daily-code / filterTracks

Function filterTracks

apps/web/components/Tracks.tsx:62–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 const isCohort3Selected = selectedCohort === CohortGroup.Three;
61
62 const filterTracks = () => {
63 setLoading(true);
64 setFilteredTracks(tracks.filter((t) => selectedCohort === 3 ? t.cohort === 3 : t.cohort !== 3));
65 setCurrentPage(1); // Reset to first page on filtering
66 setLoading(false);
67 };
68
69 const sortTracks = (sortBy: string) => {
70 setLoading(true);

Callers 1

TracksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected