Skip to content

Commit

Permalink
style(user-profile): eslinting fix, add dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
koepferd committed Aug 16, 2024
1 parent 10201ec commit c30391a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,21 @@ export const Profile = () => {
.querySelector('.navigation__wrapper')
?.classList.remove('navigation__wrapper--mobileHidden');
document.querySelector('.header')?.classList.remove('header--mobile');
}, []);

useEffect(() => {
scrollContainer.current.scrollTo(0, 0);
}, [location]);

useEffect(() => {
// First agency can be set as only one session per asker is possible
// isSubsequentRegistrationAllowed false on consultingType
const specAgency = Object.values(userData.consultingTypes).filter(
(resort: any) =>
resort.isRegistered && resort.agency ? resort : null
);
setSpecificAgency(specAgency[0].agency);
}, []);

useEffect(() => {
scrollContainer.current.scrollTo(0, 0);
}, [location]);
}, [setSpecificAgency, userData]);

useEffect(() => {
setMobileMenu(
Expand Down

0 comments on commit c30391a

Please sign in to comment.