Skip to content

Commit

Permalink
don't reinvent the wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktrn committed Dec 2, 2024
1 parent 464902d commit bf39997
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { ArrowPathRoundedSquareIcon, ArrowRightIcon, CheckIcon, ExclamationCircleIcon } from "@heroicons/react/20/solid";
import {
ArrowPathRoundedSquareIcon,
ArrowRightIcon,
ExclamationCircleIcon,
} from "@heroicons/react/20/solid";
import { BookOpenIcon } from "@heroicons/react/24/solid";
import { useLocation, useNavigation } from "@remix-run/react";
import { LoaderFunctionArgs } from "@remix-run/server-runtime";
Expand Down Expand Up @@ -247,9 +251,7 @@ function BatchesTable({ batches, hasFilters, filters }: BatchList) {
function BatchActionsCell({ batch, path }: { batch: BatchListItem; path: string }) {
const location = useLocation();

const isPending = batch.status === "PENDING";

if (!isPending) return <TableCell to={path}>{""}</TableCell>;
if (batch.hasFinished) return <TableCell to={path}>{""}</TableCell>;

return (
<TableCellMenu
Expand All @@ -262,7 +264,7 @@ function BatchActionsCell({ batch, path }: { batch: BatchListItem; path: string
leadingIconClassName="text-blue-500"
title="View batch"
/>
{isPending && (
{!batch.hasFinished && (
<Dialog>
<DialogTrigger
asChild
Expand Down

0 comments on commit bf39997

Please sign in to comment.