File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
src/Components/CreateImageWizard/steps/FileSystem/components Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ import {
2525import UsrSubDirectoriesDisabled from '../../../UsrSubDirectoriesDisabled' ;
2626
2727const FileSystemConfiguration = ( ) => {
28- const partitions = useAppSelector ( selectFilesystemPartitions ) ;
2928 const environments = useAppSelector ( selectImageTypes ) ;
29+ const filesystemPartitions = useAppSelector ( selectFilesystemPartitions ) ;
3030
3131 const dispatch = useAppDispatch ( ) ;
3232
@@ -58,7 +58,7 @@ const FileSystemConfiguration = () => {
5858 < Content >
5959 < Content component = { ContentVariants . h3 } > Configure partitions</ Content >
6060 </ Content >
61- { partitions . find ( ( partition ) =>
61+ { filesystemPartitions . find ( ( partition ) =>
6262 partition . mountpoint . includes ( '/usr' ) ,
6363 ) && < UsrSubDirectoriesDisabled /> }
6464 < Content >
@@ -94,7 +94,7 @@ const FileSystemConfiguration = () => {
9494 ) } images`}
9595 />
9696 ) }
97- < FileSystemTable />
97+ < FileSystemTable partitions = { filesystemPartitions } />
9898 < Content >
9999 < Button
100100 className = 'pf-v6-u-text-align-left'
Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ import {
1414import MinimumSizePopover from './MinimumSizePopover' ;
1515import Row from './Row' ;
1616
17- import { useAppDispatch , useAppSelector } from '../../../../../store/hooks' ;
18- import {
19- changePartitionOrder ,
20- selectFilesystemPartitions ,
21- } from '../../../../../store/wizardSlice' ;
17+ import { useAppDispatch } from '../../../../../store/hooks' ;
18+ import { changePartitionOrder } from '../../../../../store/wizardSlice' ;
19+ import { FilesystemPartition } from '../fscTypes' ;
20+
21+ type FileSystemTableTypes = {
22+ partitions : FilesystemPartition [ ] ;
23+ } ;
2224
23- const FileSystemTable = ( ) => {
25+ const FileSystemTable = ( { partitions } : FileSystemTableTypes ) => {
2426 const [ draggedItemId , setDraggedItemId ] = useState < string | null > ( null ) ;
2527 const [ draggingToItemIndex , setDraggingToItemIndex ] = useState < number | null > (
2628 null ,
@@ -29,7 +31,6 @@ const FileSystemTable = () => {
2931 const [ tempItemOrder , setTempItemOrder ] = useState < string [ ] > ( [ ] ) ;
3032
3133 const bodyRef = useRef < HTMLTableSectionElement > ( null ) ;
32- const partitions = useAppSelector ( selectFilesystemPartitions ) ;
3334 const itemOrder = partitions . map ( ( partition ) => partition . id ) ;
3435 const dispatch = useAppDispatch ( ) ;
3536 const isValidDrop = (
You can’t perform that action at this time.
0 commit comments