@@ -49,24 +49,24 @@ const App = () => {
49
49
return ;
50
50
}
51
51
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 ) ;
55
55
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 = "" ;
59
59
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 ) ) ;
69
65
}
66
+ getChallengesDebounced . current ( ( ) =>
67
+ store . dispatch ( actions . challenges . getChallenges ( updatedFilter ) )
68
+ ) ;
69
+ //}
70
70
} , [ location ] ) ;
71
71
72
72
useEffect ( ( ) => {
0 commit comments