Skip to content

Commit

Permalink
Merge pull request #33399 from koko57/fix/searchpage-optimization
Browse files Browse the repository at this point in the history
[CP Staging] Fix/searchpage optimization
  • Loading branch information
mountiny authored Dec 21, 2023
2 parents 2f7c2b2 + 1085833 commit cc4ebd0
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/pages/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,10 @@ const defaultProps = {

function SearchPage({betas, personalDetails, reports, isSearchingForReports}) {
const [searchValue, setSearchValue] = useState('');
const [searchOptions, setSearchOptions] = useState(() => {
const {
recentReports: localRecentReports,
personalDetails: localPersonalDetails,
userToInvite: localUserToInvite,
} = OptionsListUtils.getSearchOptions(reports, personalDetails, '', betas);

return {
recentReports: localRecentReports,
personalDetails: localPersonalDetails,
userToInvite: localUserToInvite,
};
const [searchOptions, setSearchOptions] = useState({
recentReports: {},
personalDetails: {},
userToInvite: {},
});

const {isOffline} = useNetwork();
Expand Down

0 comments on commit cc4ebd0

Please sign in to comment.