Skip to content

issue 4874 fix #4882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import PT from 'prop-types';
import SwitchWithLabel from 'components/SwitchWithLabel';
import { challenge as challengeUtils } from 'topcoder-react-lib';
import { COMPETITION_TRACKS as TRACKS } from 'utils/tc';
import _ from 'lodash';

import localStorage from 'localStorage';
import ChallengeSearchBar from './ChallengeSearchBar';
import EditTrackPanel from './EditTrackPanel';
import FiltersIcon from './FiltersSwitch/filters-icon.svg';
Expand Down Expand Up @@ -54,8 +52,6 @@ export default function ChallengeFilters({
const switchTrack = (track, on) => {
const act = on ? Filter.addTrack : Filter.removeTrack;
const filterObj = act(filterState, track);
const newFilterObj = _.pick(filterObj, 'tracks');
localStorage.setItem('trackStatus', JSON.stringify(newFilterObj));
setFilterState(filterObj);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ export default function FiltersPanel({
setFilterState({});
selectCommunity(defaultCommunityId);
setSearchText('');
localStorage.setItem('trackStatus', JSON.stringify({}));
}}
size="sm"
theme={{ button: style.button }}
Expand Down
7 changes: 0 additions & 7 deletions src/shared/containers/challenge-listing/FilterPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import shortId from 'shortid';
import FilterPanel from 'components/challenge-listing/Filters/ChallengeFilters';
import PT from 'prop-types';
import React from 'react';
import localStorage from 'localStorage';
import sidebarActions from 'actions/challenge-listing/sidebar';
import { BUCKETS, isReviewOpportunitiesBucket } from 'utils/challenge-listing/buckets';
import { bindActionCreators } from 'redux';
Expand Down Expand Up @@ -64,12 +63,6 @@ export class Container extends React.Component {
const query = qs.parse(window.location.search.slice(1));
if (query.filter && !filterState.track) {
setFilterState(query.filter);
} else {
const trackStatus = localStorage.getItem('trackStatus');
const filterObj = trackStatus ? JSON.parse(trackStatus) : null;
if (filterObj) {
setFilterState(filterObj);
}
}
}

Expand Down