Skip to content
Snippets Groups Projects
Commit 9098ee74 authored by Viktorbelyakovv's avatar Viktorbelyakovv
Browse files

commit-completed-sorting

parent 23c796c7
Branches
No related tags found
1 merge request!14Feature sorting part2
......@@ -55,10 +55,10 @@ const Sorting = ({
const onResetSorting = () => {
setSortDate(false);
setSortName(false);
setSearchParams(createSearchParams());
dispatch(
getTasksThunk({ isCompletedTasks, sortDate: false, sortName: false })
);
setSearchParams(createSearchParams());
};
useEffect(() => {
......
import React from "react";
import React, { useState } from "react";
import Sorting from "../components/Sorting";
import ListTasks from "../components/ListTasks";
const CompletedTasksPage = () => {
const [sortDate, setSortDate] = useState(false);
const [sortName, setSortName] = useState(false);
return (
<>
<h1>COMPLETED TASKS</h1>
<Sorting
isCompletedTasks={true}
sortDate={sortDate}
setSortDate={setSortDate}
sortName={sortName}
setSortName={setSortName}
/>
<ListTasks isCompletedTasks={true} />
</>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment