Skip to content

Commit

Permalink
added useffect profilelistpage
Browse files Browse the repository at this point in the history
  • Loading branch information
Chelakhovl committed Dec 16, 2024
1 parent 185f5d2 commit 6a711e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FrontEnd/src/pages/ProfileList/ProfileListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ export default function ProfileListPage({ isAuthorized, isSaved }) {
}
}, [fetchedProfiles, pageSize, currentPage, isSaved]);

useEffect(() => {
setActiveTab(searchParams.get('companyType') || 'all');
setActiveBtn(searchParams.get('activity') || 'all');
}, [searchParams]);

const changeCompanies = (companyId, saved) => {
setProfiles((prevProfiles) =>
prevProfiles.map((profile) =>
Expand Down

0 comments on commit 6a711e3

Please sign in to comment.