@@ -49,24 +49,24 @@ const App = () => {
4949 return ;
5050 }
5151
52- if ( location . pathname === "/earn/find/challenges" ) {
53- const params = utils . url . parseUrlQuery ( location . search ) ;
54- const toUpdate = utils . challenge . createChallengeFilter ( params ) ;
52+ // if (location.pathname === "/earn/find/challenges") {
53+ const params = utils . url . parseUrlQuery ( location . search ) ;
54+ const toUpdate = utils . challenge . createChallengeFilter ( params ) ;
5555
56- if ( ! toUpdate . types ) toUpdate . types = [ ] ;
57- if ( ! toUpdate . tracks ) toUpdate . tracks = [ ] ;
58- if ( ! toUpdate . bucket ) toUpdate . bucket = "" ;
56+ if ( ! toUpdate . types ) toUpdate . types = [ ] ;
57+ if ( ! toUpdate . tracks ) toUpdate . tracks = [ ] ;
58+ if ( ! toUpdate . bucket ) toUpdate . bucket = "" ;
5959
60- const updatedFilter = { ...initialChallengeFilter , ...toUpdate } ;
61- const currentFilter = store . getState ( ) . filter . challenge ;
62- const diff = ! _ . isEqual ( updatedFilter , currentFilter ) ;
63- if ( diff ) {
64- store . dispatch ( actions . filter . updateFilter ( updatedFilter ) ) ;
65- }
66- getChallengesDebounced . current ( ( ) =>
67- store . dispatch ( actions . challenges . getChallenges ( updatedFilter ) )
68- ) ;
60+ const updatedFilter = { ...initialChallengeFilter , ...toUpdate } ;
61+ const currentFilter = store . getState ( ) . filter . challenge ;
62+ const diff = ! _ . isEqual ( updatedFilter , currentFilter ) ;
63+ if ( diff ) {
64+ store . dispatch ( actions . filter . updateFilter ( updatedFilter ) ) ;
6965 }
66+ getChallengesDebounced . current ( ( ) =>
67+ store . dispatch ( actions . challenges . getChallenges ( updatedFilter ) )
68+ ) ;
69+ //}
7070 } , [ location ] ) ;
7171
7272 useEffect ( ( ) => {
0 commit comments