Skip to content

Commit

Permalink
fix(ui): TE-2492 redirect loop from home page fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nalin Patidar authored and Nalin Patidar committed Oct 24, 2024
1 parent 09ea21f commit 3b58485
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions thirdeye-ui/src/app/pages/home-page/home-page.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,19 @@ export const HomePage: FunctionComponent = () => {
});

useEffect(() => {
if (getAlertsQuery.data && getAlertsQuery.data.length === 0) {
if (
getAlertsQuery.isFetching === false &&
getAlertsQuery.isSuccess &&
getAlertsQuery.data &&
getAlertsQuery.data.length === 0
) {
navigate(AppRoute.WELCOME);
}
}, [getAlertsQuery.data]);
}, [
getAlertsQuery.data,
getAlertsQuery.isSuccess,
getAlertsQuery.isFetching,
]);

useEffect(() => {
if (
Expand Down

0 comments on commit 3b58485

Please sign in to comment.