Skip to content

Commit 9e0780f

Browse files
committed
fix(webapp): use correct override base value type
1 parent 580c617 commit 9e0780f

File tree

1 file changed

+5
-9
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues

1 file changed

+5
-9
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { DialogClose } from "@radix-ui/react-dialog";
1212
import { Form, useNavigation, useSearchParams, type MetaFunction } from "@remix-run/react";
1313
import { type ActionFunctionArgs, type LoaderFunctionArgs } from "@remix-run/server-runtime";
1414
import type { RuntimeEnvironmentType } from "@trigger.dev/database";
15+
import type { QueueItem } from "@trigger.dev/core/v3/schemas";
1516
import { useEffect, useState } from "react";
1617
import { typedjson, useTypedLoaderData } from "remix-typedjson";
1718
import { z } from "zod";
@@ -926,12 +927,7 @@ function QueueOverrideConcurrencyButton({
926927
queue,
927928
environmentConcurrencyLimit,
928929
}: {
929-
queue: {
930-
id: string;
931-
name: string;
932-
concurrencyLimit: number | null;
933-
concurrency?: { overriddenAt: Date | null };
934-
};
930+
queue: QueueItem;
935931
environmentConcurrencyLimit: number;
936932
}) {
937933
const navigation = useNavigation();
@@ -970,10 +966,10 @@ function QueueOverrideConcurrencyButton({
970966
{isOverridden ? (
971967
<Paragraph>
972968
This queue's concurrency limit is currently overridden to {currentLimit}.
973-
{queue.concurrencyLimitBase !== null &&
974-
` The original limit set in code was ${queue.concurrencyLimitBase}.`}{" "}
969+
{typeof queue.concurrency?.base === "number" &&
970+
` The original limit set in code was ${queue.concurrency.base}.`}{" "}
975971
You can update the override or remove it to restore the{" "}
976-
{queue.concurrencyLimitBase !== null
972+
{typeof queue.concurrency?.base === "number"
977973
? "limit set in code"
978974
: "environment concurrency limit"}
979975
.

0 commit comments

Comments
 (0)