Fix for TS error
This commit is contained in:
@@ -2,7 +2,6 @@ import { ChevronRightIcon } from "@heroicons/react/20/solid";
|
||||
import { TaskEventStyle } from "@trigger.dev/core/v3";
|
||||
import type { TaskEventLevel } from "@trigger.dev/database";
|
||||
import { Fragment } from "react";
|
||||
import { RunEvent } from "~/presenters/v3/RunPresenter.server";
|
||||
import { cn } from "~/utils/cn";
|
||||
|
||||
type SpanTitleProps = {
|
||||
@@ -107,9 +106,15 @@ function eventTextClassName(event: Pick<SpanTitleProps, "isError" | "style" | "l
|
||||
}
|
||||
}
|
||||
|
||||
export function eventBackgroundClassName(
|
||||
event: Pick<RunEvent["data"], "isError" | "style" | "level" | "isPartial" | "isCancelled">
|
||||
) {
|
||||
type RunEvent = {
|
||||
isError: boolean;
|
||||
style: TaskEventStyle;
|
||||
level: TaskEventLevel;
|
||||
isPartial: boolean;
|
||||
isCancelled: boolean;
|
||||
};
|
||||
|
||||
export function eventBackgroundClassName(event: RunEvent) {
|
||||
if (event.isError) {
|
||||
return "bg-error";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user