diff --git a/atcoder-problems-frontend/src/pages/ListPage/SmallTable.tsx b/atcoder-problems-frontend/src/pages/ListPage/SmallTable.tsx index 314b0e59..1f75b875 100755 --- a/atcoder-problems-frontend/src/pages/ListPage/SmallTable.tsx +++ b/atcoder-problems-frontend/src/pages/ListPage/SmallTable.tsx @@ -10,7 +10,7 @@ import { useMergedProblemMap } from "../../api/APIClient"; interface Props { submissions: Submission[]; - setFilterFunc: (point: number) => void; + setFilterFunc: (from: number, to: number) => void; } export const getTotalCount = ( @@ -95,7 +95,7 @@ export const SmallTable: React.FC = ({ submissions, setFilterFunc }) => { setFilterFunc(point)} + onClick={(): void => setFilterFunc(point, point + 99)} > {`${point}-`} diff --git a/atcoder-problems-frontend/src/pages/ListPage/index.tsx b/atcoder-problems-frontend/src/pages/ListPage/index.tsx index e888c75b..15ce5233 100755 --- a/atcoder-problems-frontend/src/pages/ListPage/index.tsx +++ b/atcoder-problems-frontend/src/pages/ListPage/index.tsx @@ -25,12 +25,13 @@ export const ListPage: React.FC = (props) => { const submissions = useMultipleUserSubmissions(users).data ?? []; const progressReset = useProgressResetList().data; - const setExactPointFilter = (point: number): void => { + const setPointFilter = (from: number, to: number): void => { const params = new URLSearchParams(location.search); - params.set(FilterParams.FromPoint, point.toString()); - params.set(FilterParams.ToPoint, point.toString()); + params.set(FilterParams.FromPoint, from.toString()); + params.set(FilterParams.ToPoint, to.toString()); history.push({ ...location, search: params.toString() }); }; + const setDifficultyFilter = (from: number, to: number): void => { const params = new URLSearchParams(location.search); params.set(FilterParams.FromDifficulty, from.toString()); @@ -53,7 +54,7 @@ export const ListPage: React.FC = (props) => {