I need to redirect specific types of users from 4 routes which all should be route grouped.
I am thinking of using route grouping and specifying a layout within that group where I can do a server action which checks for user type and then would redirect if true.
My thought process was this would only make a call to check the user on the routes in question vs. every route with middleware. Is this the right approach?
Everything worked as expected when I scaffolded this out via route groups with a layout.
1