AG
{expand === NExplorerEntityExpandType.dir && ListData ? (
<FixedSizeList
outerRef={ref}
itemCount={ListData.length}
height={height - 2}
width={width - 2}
itemSize={32}
itemData={ListData}>
{Item}
</FixedSizeList>
) : opend?.type === NExplorerEntityType.file_empty ? (
<Typography>Пустой файл</Typography>
) : expand === NExplorerEntityExpandType.txt &&
TxtData &&
opend!.encoding ? (
<MyMonacoEditor
height={height - 2}
width={width - 2}
data={TxtData}
encoding={opend!.encoding}
/>
) : null}
Вот с переписыванием в тернарники
{(expand === NExplorerEntityExpandType.dir && ListData && (
<FixedSizeList
outerRef={ref}
itemCount={ListData.length}
height={height - 2}
width={width - 2}
itemSize={32}
itemData={ListData}>
{Item}
</FixedSizeList>
)) ||
(opend?.type === NExplorerEntityType.file_empty && (
<Typography>Пустой файл</Typography>
)) ||
(expand === NExplorerEntityExpandType.txt &&
TxtData &&
opend!.encoding && (
<MyMonacoEditor
height={height - 2}
width={width - 2}
data={TxtData}
encoding={opend!.encoding}
/>
))}