|
1 | 1 | import { ArrowRightIcon, ExclamationCircleIcon } from "@heroicons/react/20/solid"; |
2 | 2 | import { BookOpenIcon } from "@heroicons/react/24/solid"; |
3 | | -import { type MetaFunction, Outlet, useNavigation, useParams } from "@remix-run/react"; |
| 3 | +import { type MetaFunction, Outlet, useNavigation, useParams, useLocation } from "@remix-run/react"; |
4 | 4 | import { type LoaderFunctionArgs } from "@remix-run/server-runtime"; |
5 | 5 | import { formatDuration } from "@trigger.dev/core/v3/utils/durations"; |
6 | 6 | import { typedjson, useTypedLoaderData } from "remix-typedjson"; |
@@ -160,7 +160,10 @@ export default function Page() { |
160 | 160 |
|
161 | 161 | function BatchesTable({ batches, hasFilters, filters }: BatchList) { |
162 | 162 | const navigation = useNavigation(); |
163 | | - const isLoading = navigation.state !== "idle"; |
| 163 | + const location = useLocation(); |
| 164 | + const isLoading = |
| 165 | + navigation.state !== "idle" && navigation.location?.pathname === location.pathname; |
| 166 | + |
164 | 167 | const organization = useOrganization(); |
165 | 168 | const project = useProject(); |
166 | 169 | const environment = useEnvironment(); |
@@ -210,7 +213,8 @@ function BatchesTable({ batches, hasFilters, filters }: BatchList) { |
210 | 213 | </TableBlankRow> |
211 | 214 | ) : ( |
212 | 215 | batches.map((batch) => { |
213 | | - const inspectorPath = v3BatchPath(organization, project, environment, batch); |
| 216 | + const basePath = v3BatchPath(organization, project, environment, batch); |
| 217 | + const inspectorPath = `${basePath}${location.search}`; |
214 | 218 | const runsPath = v3BatchRunsPath(organization, project, environment, batch); |
215 | 219 | const isSelected = batchParam === batch.friendlyId; |
216 | 220 |
|
|
0 commit comments