Skip to content

Commit 161673d

Browse files
committed
Fix query params disappearing
1 parent 31c2f06 commit 161673d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

web/src/features/mentors/hooks/useMentorsPageState.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ export const useMentorsPageState = () => {
100100
const currentExpandedMentor = expandedMentor();
101101
if (!currentExpandedMentor) return;
102102

103+
// Don't collapse the expanded mentor before data has loaded,
104+
// otherwise URL params get wiped on initial page load.
105+
if (diplomas.loading) return;
106+
103107
const mentorStillVisible = filteredSummaries().some(
104108
(summary) => summary.mentor === currentExpandedMentor,
105109
);

0 commit comments

Comments
 (0)