From 5e7564fdb8ca147d3875d30e89492573c684dfc1 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Tue, 20 Aug 2024 19:36:30 +0100 Subject: [PATCH] fix: linter changes --- .../server/backups/BackupContainer.tsx | 1 - .../components/server/backups/BackupRow.tsx | 25 +++++++++++-------- .../schedules/ScheduleEditContainer.tsx | 24 ++++++++---------- .../server/schedules/ScheduleRow.tsx | 4 +-- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/resources/scripts/components/server/backups/BackupContainer.tsx b/resources/scripts/components/server/backups/BackupContainer.tsx index 1aadea77b..a6531630e 100644 --- a/resources/scripts/components/server/backups/BackupContainer.tsx +++ b/resources/scripts/components/server/backups/BackupContainer.tsx @@ -1,4 +1,3 @@ -import { For } from 'million/react'; import { useContext, useEffect, useState } from 'react'; import FlashMessageRender from '@/components/FlashMessageRender'; diff --git a/resources/scripts/components/server/backups/BackupRow.tsx b/resources/scripts/components/server/backups/BackupRow.tsx index 11bee3e5d..7274706ff 100644 --- a/resources/scripts/components/server/backups/BackupRow.tsx +++ b/resources/scripts/components/server/backups/BackupRow.tsx @@ -1,3 +1,5 @@ +import { faFile, faLock } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { format, formatDistanceToNow } from 'date-fns'; import Can from '@/components/elements/Can'; @@ -15,8 +17,6 @@ import getServerBackups from '@/api/swr/getServerBackups'; import useWebsocketEvent from '@/plugins/useWebsocketEvent'; import BackupContextMenu from './BackupContextMenu'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faFile, faLock } from '@fortawesome/free-solid-svg-icons'; interface Props { backup: ServerBackup; @@ -36,12 +36,12 @@ export default ({ backup }: Props) => { b.uuid !== backup.uuid ? b : { - ...b, - isSuccessful: parsed.is_successful || true, - checksum: (parsed.checksum_type || '') + ':' + (parsed.checksum || ''), - bytes: parsed.file_size || 0, - completedAt: new Date(), - }, + ...b, + isSuccessful: parsed.is_successful || true, + checksum: (parsed.checksum_type || '') + ':' + (parsed.checksum || ''), + bytes: parsed.file_size || 0, + completedAt: new Date(), + }, ), }), false, @@ -79,7 +79,9 @@ export default ({ backup }: Props) => {
{backup.name}
-{backup.checksum}
++ {backup.checksum} +
@@ -90,7 +92,10 @@ export default ({ backup }: Props) => { {bytesToString(backup.bytes)} )},
-+
{formatDistanceToNow(backup.createdAt, { includeSeconds: true, addSuffix: true })}
diff --git a/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx b/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx index 3241e9c4e..59e15afdf 100644 --- a/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx +++ b/resources/scripts/components/server/schedules/ScheduleEditContainer.tsx @@ -99,9 +99,7 @@ export default () => { N/A )} - +