This commit is contained in:
Stephen Zhou
2026-03-20 11:33:27 +08:00
parent 093664757f
commit eb56a2c6fc

View File

@@ -14,9 +14,6 @@ export default function RoleRouteGuard({ children }: { children: ReactNode }) {
const shouldGuardRoute = datasetOperatorRedirectRoutes.some(route => isPathUnderRoute(pathname, route))
const shouldRedirect = shouldGuardRoute && !isLoadingCurrentWorkspace && isCurrentWorkspaceDatasetOperator
if (shouldGuardRoute && isLoadingCurrentWorkspace)
return null
if (shouldRedirect)
return redirect('/datasets')