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:
parent
8089e366b8
commit
607700b932
@ -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>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user