1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00

refactor: remove conditionally render

This commit is contained in:
Tymoteusz Czech 2025-07-29 20:43:34 +02:00
parent 8089e366b8
commit 607700b932
No known key found for this signature in database
GPG Key ID: 133555230D88D75F

View File

@ -9,7 +9,6 @@ import {
useState,
} from 'react';
import { Tooltip } from '@mui/material';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { AnnouncerContext } from 'component/common/Announcer/AnnouncerContext/AnnouncerContext';
import {
StyledButton,
@ -114,9 +113,7 @@ export const CellSortable: FC<ICellSortableProps> = ({
isFlexGrow={isFlexGrow}
isSortable={isSortable}
>
<ConditionallyRender
condition={isSortable}
show={
{isSortable ? (
<Tooltip title={tooltipTitle} arrow>
<StyledButton
isSorted={isSorted}
@ -147,9 +144,9 @@ export const CellSortable: FC<ICellSortableProps> = ({
</StyledVisibleAbsoluteLayer>
</StyledButton>
</Tooltip>
}
elseShow={<div style={alignStyle}>{children}</div>}
/>
) : (
<div style={alignStyle}>{children}</div>
)}
</StyledTableCell>
);
};