Skip to content

Commit bf39997

Browse files
committed
don't reinvent the wheel
1 parent 464902d commit bf39997

File tree

1 file changed

+7
-5
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches

1 file changed

+7
-5
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { ArrowPathRoundedSquareIcon, ArrowRightIcon, CheckIcon, ExclamationCircleIcon } from "@heroicons/react/20/solid";
1+
import {
2+
ArrowPathRoundedSquareIcon,
3+
ArrowRightIcon,
4+
ExclamationCircleIcon,
5+
} from "@heroicons/react/20/solid";
26
import { BookOpenIcon } from "@heroicons/react/24/solid";
37
import { useLocation, useNavigation } from "@remix-run/react";
48
import { LoaderFunctionArgs } from "@remix-run/server-runtime";
@@ -247,9 +251,7 @@ function BatchesTable({ batches, hasFilters, filters }: BatchList) {
247251
function BatchActionsCell({ batch, path }: { batch: BatchListItem; path: string }) {
248252
const location = useLocation();
249253

250-
const isPending = batch.status === "PENDING";
251-
252-
if (!isPending) return <TableCell to={path}>{""}</TableCell>;
254+
if (batch.hasFinished) return <TableCell to={path}>{""}</TableCell>;
253255

254256
return (
255257
<TableCellMenu
@@ -262,7 +264,7 @@ function BatchActionsCell({ batch, path }: { batch: BatchListItem; path: string
262264
leadingIconClassName="text-blue-500"
263265
title="View batch"
264266
/>
265-
{isPending && (
267+
{!batch.hasFinished && (
266268
<Dialog>
267269
<DialogTrigger
268270
asChild

0 commit comments

Comments
 (0)