I was struggling with redirect() not triggering at all for half an hour and just found out that my layout.tsx didn't deal with children props. After i provide it for layout.tsx the redirect is working lmao
redirect()
layout.tsx
children