From c1407c87e9a14f5ea22acbdbec274ae0918b9d76 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sat, 17 Aug 2024 03:01:47 +0100 Subject: [PATCH] fix(schedules): linter changes --- .../components/elements/ItemContainer.tsx | 16 +++++++++--- .../schedules/ScheduleEditContainer.tsx | 26 +++++++++---------- .../server/schedules/ScheduleTaskRow.tsx | 10 +++---- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/resources/scripts/components/elements/ItemContainer.tsx b/resources/scripts/components/elements/ItemContainer.tsx index fba9ff21e..845bacbed 100644 --- a/resources/scripts/components/elements/ItemContainer.tsx +++ b/resources/scripts/components/elements/ItemContainer.tsx @@ -4,18 +4,28 @@ import { v4 } from 'uuid'; export interface ContainerProps { title: string; description: string; - children: React.ReactNode; + children?: React.ReactNode; labelClasses?: string; titleClasses?: string; descriptionClasses?: string; divClasses?: string; } -const ItemContainer = ({ title, description, children, labelClasses, titleClasses, descriptionClasses, divClasses }: ContainerProps) => { +const ItemContainer = ({ + title, + description, + children, + labelClasses, + titleClasses, + descriptionClasses, + divClasses, +}: ContainerProps) => { const uuid = useMemo(() => v4(), []); return ( -
+
diff --git a/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx b/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx index 71bdadc39..764293612 100644 --- a/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx +++ b/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx @@ -4,6 +4,7 @@ import { useState } from 'react'; import Can from '@/components/elements/Can'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; +import ItemContainer from '@/components/elements/ItemContainer'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; import TaskDetailsModal from '@/components/server/schedules/TaskDetailsModal'; @@ -14,7 +15,6 @@ import { Schedule, Task } from '@/api/server/schedules/getServerSchedules'; import { ServerContext } from '@/state/server'; import useFlash from '@/plugins/useFlash'; -import ItemContainer from '@/components/elements/ItemContainer'; interface Props { schedule: Schedule; @@ -98,18 +98,14 @@ export default ({ schedule, task }: Props) => {
{task.continueOnFailure && (
-
+
Continues on Failure
)} {task.sequenceId > 1 && task.timeOffset > 0 && (
-
- {task.timeOffset}s later -
+
{task.timeOffset}s later
)}