From 2c3efe4c04850cf3466994c1ae8bbfe0ebb86625 Mon Sep 17 00:00:00 2001 From: regexowl Date: Mon, 28 Jul 2025 15:25:24 +0200 Subject: [PATCH] Wizard: Resolve FSC lint warnings This resolves lint warnings for File System Configuration step. --- .../steps/FileSystem/components/FileSystemConfiguration.tsx | 4 ++-- .../steps/FileSystem/components/FileSystemTable.tsx | 2 +- src/Components/CreateImageWizard/steps/FileSystem/index.tsx | 5 ++--- .../CreateImageWizard/steps/Review/ReviewStepTextLists.tsx | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemConfiguration.tsx b/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemConfiguration.tsx index dd24d4f8..763577dd 100644 --- a/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemConfiguration.tsx +++ b/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemConfiguration.tsx @@ -58,8 +58,8 @@ const FileSystemConfiguration = () => { Configure partitions - {partitions?.find((partition) => - partition?.mountpoint?.includes('/usr') + {partitions.find((partition) => + partition.mountpoint.includes('/usr') ) && } diff --git a/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemTable.tsx b/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemTable.tsx index 93e3aa76..4e269537 100644 --- a/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemTable.tsx +++ b/src/Components/CreateImageWizard/steps/FileSystem/components/FileSystemTable.tsx @@ -520,7 +520,7 @@ const FileSystemTable = () => { onDragLeave={onDragLeave} ref={bodyRef} > - {partitions && + {partitions.length > 0 && partitions.map((partition) => ( { @@ -30,13 +31,11 @@ const FileSystemStep = () => { - ) : fileSystemConfigurationType === 'manual' ? ( + ) : ( <> - ) : ( - fileSystemConfigurationType === 'oscap' && )} ); diff --git a/src/Components/CreateImageWizard/steps/Review/ReviewStepTextLists.tsx b/src/Components/CreateImageWizard/steps/Review/ReviewStepTextLists.tsx index 03fc4b01..ce0c76ec 100644 --- a/src/Components/CreateImageWizard/steps/Review/ReviewStepTextLists.tsx +++ b/src/Components/CreateImageWizard/steps/Review/ReviewStepTextLists.tsx @@ -202,7 +202,7 @@ type MinSizeProps = { export const MinSize = ({ partitions }: MinSizeProps) => { let minSize = ''; - if (partitions) { + if (partitions.length > 0) { let size = 0; for (const partition of partitions) { size += Number(partition.min_size) * getConversionFactor(partition.unit);