Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion dashboard/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ const Batches = lazy(() =>
default: m.Batches,
})),
);
const BatchInfo = lazy(() =>
import("./components/features/batches/BatchInfo").then((m) => ({
default: m.BatchInfo,
})),
);
const FileRequests = lazy(() =>
import("./components/features/batches/FileRequests").then((m) => ({
default: m.FileRequests,
Expand Down Expand Up @@ -121,7 +126,11 @@ const queryClient = new QueryClient({
mutations: {
onError: (error) => {
// Handle 401s globally for mutations
if (error instanceof Error && "status" in error && error.status === 401) {
if (
error instanceof Error &&
"status" in error &&
error.status === 401
) {
// Clear all queries and redirect to login
queryClient.clear();
window.location.href = "/login";
Expand Down Expand Up @@ -279,6 +288,18 @@ function AppRoutes() {
</AppLayout>
}
/>
<Route
path="/batches/:batchId"
element={
<AppLayout>
<ProtectedRoute path="/batches/:batchId">
<Suspense fallback={<RouteLoader />}>
<BatchInfo />
</Suspense>
</ProtectedRoute>
</AppLayout>
}
/>
<Route
path="/batches/files/:fileId/content"
element={
Expand Down
Loading