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