Wizard: Resolve FSC lint warnings

This resolves lint warnings for File System Configuration step.
This commit is contained in:
regexowl 2025-07-28 15:25:24 +02:00 committed by Klara Simickova
parent ad5ea22da8
commit 2c3efe4c04
4 changed files with 6 additions and 7 deletions

View file

@ -58,8 +58,8 @@ const FileSystemConfiguration = () => {
<Content>
<Content component={ContentVariants.h3}>Configure partitions</Content>
</Content>
{partitions?.find((partition) =>
partition?.mountpoint?.includes('/usr')
{partitions.find((partition) =>
partition.mountpoint.includes('/usr')
) && <UsrSubDirectoriesDisabled />}
<Content>
<Content>

View file

@ -520,7 +520,7 @@ const FileSystemTable = () => {
onDragLeave={onDragLeave}
ref={bodyRef}
>
{partitions &&
{partitions.length > 0 &&
partitions.map((partition) => (
<Row
onDrop={onDrop}

View file

@ -9,6 +9,7 @@ import FileSystemPartition from './components/FileSystemPartition';
import { useAppSelector } from '../../../../store/hooks';
import { selectFileSystemConfigurationType } from '../../../../store/wizardSlice';
import { useHasSpecificTargetOnly } from '../../utilities/hasSpecificTargetOnly';
export type FileSystemConfigurationType = 'automatic' | 'manual';
const FileSystemStep = () => {
@ -30,13 +31,11 @@ const FileSystemStep = () => {
<FileSystemPartition />
<FileSystemAutomaticPartition />
</>
) : fileSystemConfigurationType === 'manual' ? (
) : (
<>
<FileSystemPartition />
<FileSystemConfiguration />
</>
) : (
fileSystemConfigurationType === 'oscap' && <FileSystemConfiguration />
)}
</Form>
);

View file

@ -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);