diff --git a/src/components/elements/Button.js b/src/components/elements/Button.js index 4bdd61a..dadd45c 100644 --- a/src/components/elements/Button.js +++ b/src/components/elements/Button.js @@ -23,7 +23,7 @@ const ButtonStyle = styled(Medium)` const Button = (props) => { return ( - {props.children} diff --git a/src/components/elements/FiltersMenu/FiltersMenu.js b/src/components/elements/FiltersMenu/FiltersMenu.js index c87813a..8b51350 100644 --- a/src/components/elements/FiltersMenu/FiltersMenu.js +++ b/src/components/elements/FiltersMenu/FiltersMenu.js @@ -39,6 +39,14 @@ const FiltersMenuStyle = styled(FlexColumn)` `; const FiltersMenu = (props) => { + const resetHandler = () => { + console.log('siema'); + props.sortByHandler(0); + props.statusHandler(0); + props.challengeTypeHandler(0); + props.commercialHandler(0); + } + return ( <> { handler={props.commercialHandler} option={props.commercial}/> - - - diff --git a/src/pages/Challanges/Challenges.js b/src/pages/Challanges/Challenges.js index 8014ccf..a63a70b 100644 --- a/src/pages/Challanges/Challenges.js +++ b/src/pages/Challanges/Challenges.js @@ -31,23 +31,23 @@ const Challenges = () => { const challengesRequest = () => { getChallenges(setChallengesFromAPI); getChallenges(setChallenges, setLoading); - } + }; const sortByHandler = (value) => { setSortBy(value); - } + }; const statusHandler = (value) => { setStatus(value) - } + }; const challengeTypeHandler = (value) => { setChallengeType(value); - } + }; const commercialHandler = (value) => { setCommercial(value); - } + }; const searchQueryHandler = (event) => { _searchQueryHandler(event, challengesFromAPI, setPageNr, setChallenges);