diff --git a/__tests__/shared/components/challenge-listing/__snapshots__/index.jsx.snap b/__tests__/shared/components/challenge-listing/__snapshots__/index.jsx.snap index 8b59c41356..351bba4c01 100644 --- a/__tests__/shared/components/challenge-listing/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/challenge-listing/__snapshots__/index.jsx.snap @@ -24,18 +24,6 @@ exports[`Matches shallow shapshot 1 shapshot 1 1`] = ` setFilterState={[MockFunction]} /> -
- - -
-
- -
@@ -100,6 +75,7 @@ exports[`Matches shallow shapshot 2 shapshot 2 1`] = ` />
) } diff --git a/src/shared/components/DateRangePicker/style.scss b/src/shared/components/DateRangePicker/style.scss index f9c5461a6b..532241146a 100644 --- a/src/shared/components/DateRangePicker/style.scss +++ b/src/shared/components/DateRangePicker/style.scss @@ -392,6 +392,24 @@ margin: 20px 12px 0; } } + + .close-button { + position: absolute; + top: 0; + right: 0; + display: none; + line-height: 16px; + padding: 15px; + font-size: 36px; + color: $tc-black; + appearance: none; + background: none; + border: 0; + + @include phone { + display: block; + } + } } .endDate { diff --git a/src/shared/components/challenge-detail/Header/ChallengeTags.jsx b/src/shared/components/challenge-detail/Header/ChallengeTags.jsx index 4f624164a2..ce6190cc3a 100644 --- a/src/shared/components/challenge-detail/Header/ChallengeTags.jsx +++ b/src/shared/components/challenge-detail/Header/ChallengeTags.jsx @@ -88,9 +88,9 @@ export default function ChallengeTags(props) { && ( setImmediate(() => setChallengeListingFilter({ tags: [tag] })) + onClick={() => setImmediate(() => setChallengeListingFilter({ search: tag })) } - to={`${challengesUrl}?tags[]=${ + to={`${challengesUrl}?search=${ encodeURIComponent(tag)}`} > {tag} diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx index a5f2e8209a..d20e5ddc75 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx @@ -32,7 +32,7 @@ import Tooltip from 'components/Tooltip'; import { config, Link } from 'topcoder-react-utils'; import { COMPOSE, PRIORITY } from 'react-css-super-themr'; import { REVIEW_OPPORTUNITY_TYPES } from 'utils/tc'; -import { isFilterEmpty } from 'utils/challenge-listing/buckets'; +import { isFilterEmpty, isPastBucket } from 'utils/challenge-listing/buckets'; import SwitchWithLabel from 'components/SwitchWithLabel'; import { challenge as challengeUtils } from 'topcoder-react-lib'; import { createStaticRanges } from 'utils/challenge-listing/date-range'; @@ -64,7 +64,6 @@ export default function FiltersPanel({ // isSavingFilter, expanded, setExpanded, - past, }) { if (hidden && !expanded) { return ( @@ -226,8 +225,6 @@ export default function FiltersPanel({ data: getLabel(community), })); - const disableClearFilterButtons = isFilterEmpty(filterState, past ? 'past' : '', activeBucket); - // const mapOps = item => ({ label: item, value: item }); const mapTypes = item => ({ label: item.name, value: item.abbreviation }); const getCommunityOption = () => { @@ -249,6 +246,8 @@ export default function FiltersPanel({ }; const staticRanges = createStaticRanges(); + const past = isPastBucket(activeBucket); + const disableClearFilterButtons = isFilterEmpty(filterState, past ? 'past' : '', activeBucket); return (
@@ -495,47 +494,52 @@ export default function FiltersPanel({ ) : null } -
-
- - + +