Skip to content

Commit

Permalink
Pagination fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dbence2002 committed Sep 22, 2023
1 parent 6c3bbdc commit 99a5773
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/util/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function Pagination({paginationData}) {
const location = useLocation()
const navigate = useNavigate()
const handlePageChanged = (page) => {
UpdateQueryString(location, navigate, "page", page)
UpdateQueryString(location, navigate, ["page"], [page])
}
const cls = "px-3 py-1.5 text-sm transition duration-200 border-default border hover:bg-grey-750 text-center"
return (
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/pages/problem/ProblemSubmissions.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React, {useState} from "react";
import SubmissionsTable from "../../components/concrete/table/SubmissionsTable";
import Checkbox from "../../components/input/Checkbox"
import RoundedFrame from "../../components/container/RoundedFrame";
import Pagination from "../../components/util/Pagination";
import {useLocation, useNavigate} from "react-router-dom";
import UpdateQueryString from "../../util/updateQueryString";
import queryString from "query-string";
import {useTranslation} from "react-i18next";
import DropdownFrame from "../../components/container/DropdownFrame";
import React, {useState} from "react";
import queryString from "query-string";

function SubmissionFilterFrame() {
const {t} = useTranslation()
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/problem/ProblemSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function SubmitControlsFrame({onLanguageChanged, onSubmit}) {
}

function ProblemSubmit({ data }) {
const {t} = useTranslation()
const {problem} = useParams()
const [langIndex, setLangIndex] = useState(0)
const [submissionCode, setSubmissionCode] = useState("")
Expand Down

0 comments on commit 99a5773

Please sign in to comment.