Skip to content

Commit

Permalink
Remove navigateTo from useURLState's dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yomete committed May 25, 2023
1 parent 905286b commit d9cfb97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ui/packages/shared/components/src/hooks/useURLState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const useURLState = ({
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [value, highlightAfterFilteringEnabled, param, withURLUpdate, navigateTo]);
}, [value, highlightAfterFilteringEnabled, param, withURLUpdate]);

if (param === 'dashboard_items') {
let dashboardItems: string[] = [];
Expand Down
10 changes: 4 additions & 6 deletions ui/packages/shared/profile/src/ProfileView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,10 @@ export const ProfileView = ({

const {loader, perf} = useParcaContext();

// TODO: Figure out why profileSource's constantly changing value causes an infinite render on PSC, thereby causing the instant reset bug in the icicle graph as reported in https://github.com/polarsignals/polarsignals/issues/1991#event-9340441410

// useEffect(() => {
// // Reset the current path when the profile source changes
// setCurPath([]);
// }, [profileSource]);
useEffect(() => {
// Reset the current path when the profile source changes
setCurPath([]);
}, [profileSource]);

useEffect(() => {
async function loadGraphviz(): Promise<void> {
Expand Down

0 comments on commit d9cfb97

Please sign in to comment.