Skip to content

Commit 7146ba7

Browse files
authored
Fix Rendered more hooks than during the previous rende on /skills
Added a return null statement to prevent a hooks error.
1 parent 895eb32 commit 7146ba7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • agents-manage-ui/src/app/[tenantId]/projects/[projectId]/skills/(with-sidebar)

agents-manage-ui/src/app/[tenantId]/projects/[projectId]/skills/(with-sidebar)/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const SkillsPage: FC<PageProps<'/[tenantId]/projects/[projectId]/skills'>> = asy
3030
}
3131

3232
redirect(buildSkillFileViewHref(tenantId, projectId, files[0].skillId, files[0].filePath));
33+
// Return null to avoid `Rendered more hooks than during the previous render` error
34+
return null;
3335
};
3436

3537
export default SkillsPage;

0 commit comments

Comments
 (0)