mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
fix: console warnings and errors related to event timeline and strategy form (#8692)
Fixes browser console warnings and errors related to the event timeline and strategy form. - **Event Timeline**: Addressed a warning where the environment filter rendered with a default environment value (production) before environments were fully loaded. - **Strategy Form**: Resolved an error caused by forwarding the enabled prop as a boolean.
This commit is contained in:
parent
b52dcb3082
commit
f669d9622e
@ -96,7 +96,7 @@ export const EventTimelineHeader = ({
|
||||
<EventTimelineHeaderTip />
|
||||
<StyledCol>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(environment)}
|
||||
condition={Boolean(environment) && environments.length > 0}
|
||||
show={() => (
|
||||
<StyledFilter
|
||||
select
|
||||
|
@ -171,11 +171,11 @@ const EnvironmentIconBox = styled(Box)(({ theme }) => ({
|
||||
alignItems: 'center',
|
||||
}));
|
||||
|
||||
const EnvironmentTypography = styled(Typography)<{ enabled: boolean }>(
|
||||
({ theme, enabled }) => ({
|
||||
fontWeight: enabled ? 'bold' : 'normal',
|
||||
}),
|
||||
);
|
||||
const EnvironmentTypography = styled(Typography, {
|
||||
shouldForwardProp: (prop) => prop !== 'enabled',
|
||||
})<{ enabled: boolean }>(({ enabled }) => ({
|
||||
fontWeight: enabled ? 'bold' : 'normal',
|
||||
}));
|
||||
|
||||
const EnvironmentTypographyHeader = styled(Typography)(({ theme }) => ({
|
||||
marginRight: theme.spacing(0.5),
|
||||
|
Loading…
Reference in New Issue
Block a user