Skip to content

Commit

Permalink
router replace, and check for isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
dinmukhamedm committed Oct 31, 2024
1 parent 3be7fb5 commit 33a3965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/components/projects/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export default function Projects({ isWorkspaceEnabled }: ProjectsProps) {
);

const router = useRouter();
if (data !== undefined && data.length === 0) {
router.push('/onboarding');
if (!isLoading && data !== undefined && data.length === 0) {
router.replace('/onboarding');
}

return (
Expand Down

0 comments on commit 33a3965

Please sign in to comment.