diff --git a/src/components/ChallengePane/ChallengePane.jsx b/src/components/ChallengePane/ChallengePane.jsx index 762064fbd..e629a5c98 100644 --- a/src/components/ChallengePane/ChallengePane.jsx +++ b/src/components/ChallengePane/ChallengePane.jsx @@ -46,9 +46,9 @@ const ShowChallengeListTogglesInternal = (props) => { { - props.setSearchFilters({ filterGlobal: !props.filteringGlobal }) + props.setSearchFilters({ global: !props.showingGlobal }) }} />
@@ -127,7 +127,7 @@ export class ChallengePane extends Component { render() { const showingArchived = this.props.history.location.search.includes("archived=true"); - const filteringGlobal = this.props.history.location.search.includes("filterGlobal=true") + const showingGlobal = this.props.history.location.search.includes("global=true") const challengeStatus = [ChallengeStatus.ready, ChallengeStatus.partiallyLoaded, ChallengeStatus.none, @@ -166,7 +166,7 @@ export class ChallengePane extends Component {
- +
diff --git a/src/components/HOCs/WithSearchRoute/WithSearchRoute.jsx b/src/components/HOCs/WithSearchRoute/WithSearchRoute.jsx index e739f2cc2..fd6846ff4 100644 --- a/src/components/HOCs/WithSearchRoute/WithSearchRoute.jsx +++ b/src/components/HOCs/WithSearchRoute/WithSearchRoute.jsx @@ -38,7 +38,7 @@ export const WithSearchRoute = function(WrappedComponent, searchGroup) { query: param => this.props.setSearch(param), challengeSearch: param => this.props.setChallengeSearchMapBounds(toLatLngBounds(param), true), archived: param => this.props.setSearchFilters({ archived: param === "true" }), - filterGlobal: param => this.props.setSearchFilters({ filterGlobal: param === "true" }) + global: param => this.props.setSearchFilters({ global: param === "true" }) } state = { diff --git a/src/services/Challenge/Challenge.js b/src/services/Challenge/Challenge.js index c87fcdc15..7ec5d5752 100644 --- a/src/services/Challenge/Challenge.js +++ b/src/services/Challenge/Challenge.js @@ -443,8 +443,8 @@ export const extendedFind = function (criteria, limit = RESULTS_PER_PAGE, admin queryParams.ca = filters.archived; } - if (filters.filterGlobal) { - queryParams.fg = filters.filterGlobal; + if (filters.global) { + queryParams.cg = filters.global; } // Keywords/tags can come from both the the query and the filter, so we need to diff --git a/src/services/Challenge/ChallengeGlobal/ChallengeGlobal.js b/src/services/Challenge/ChallengeGlobal/ChallengeGlobal.js index 50c60a35e..71e53c4d8 100644 --- a/src/services/Challenge/ChallengeGlobal/ChallengeGlobal.js +++ b/src/services/Challenge/ChallengeGlobal/ChallengeGlobal.js @@ -1,5 +1,5 @@ export const challengePassesGlobalFilter = function(filter, challenge) { - if (filter.filterGlobal) { + if (filter.global) { return challenge.isGlobal === false } diff --git a/src/services/Search/Search.js b/src/services/Search/Search.js index 0e5724166..92bdddb17 100644 --- a/src/services/Search/Search.js +++ b/src/services/Search/Search.js @@ -96,7 +96,7 @@ export const PARAMS_MAP = { tags: 'tt', excludeTasks: 'tExcl', archived: "ca", - filterGlobal: "fg" + global: "cg" } @@ -159,8 +159,8 @@ export const generateSearchParametersString = (filters, boundingBox, savedChalle if (filters.archived) { searchParameters[PARAMS_MAP.archived] = filters.archived; } - if (filters.filterGlobal) { - searchParameters[PARAMS_MAP.filterGlobal] = filters.filterGlobal; + if (filters.global) { + searchParameters[PARAMS_MAP.global] = filters.global; } if (filters.reviewRequestedBy) { searchParameters[PARAMS_MAP.reviewRequestedBy] = filters.reviewRequestedBy