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>
<Content component={ContentVariants.h3}>Configure partitions</Content> <Content component={ContentVariants.h3}>Configure partitions</Content>
</Content> </Content>
{partitions?.find((partition) => {partitions.find((partition) =>
partition?.mountpoint?.includes('/usr') partition.mountpoint.includes('/usr')
) && <UsrSubDirectoriesDisabled />} ) && <UsrSubDirectoriesDisabled />}
<Content> <Content>
<Content> <Content>

View file

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

View file

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

View file

@ -202,7 +202,7 @@ type MinSizeProps = {
export const MinSize = ({ partitions }: MinSizeProps) => { export const MinSize = ({ partitions }: MinSizeProps) => {
let minSize = ''; let minSize = '';
if (partitions) { if (partitions.length > 0) {
let size = 0; let size = 0;
for (const partition of partitions) { for (const partition of partitions) {
size += Number(partition.min_size) * getConversionFactor(partition.unit); size += Number(partition.min_size) * getConversionFactor(partition.unit);