1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +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:
Nuno Góis 2024-11-08 08:18:30 +00:00 committed by GitHub
parent b52dcb3082
commit f669d9622e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -96,7 +96,7 @@ export const EventTimelineHeader = ({
<EventTimelineHeaderTip /> <EventTimelineHeaderTip />
<StyledCol> <StyledCol>
<ConditionallyRender <ConditionallyRender
condition={Boolean(environment)} condition={Boolean(environment) && environments.length > 0}
show={() => ( show={() => (
<StyledFilter <StyledFilter
select select

View File

@ -171,11 +171,11 @@ const EnvironmentIconBox = styled(Box)(({ theme }) => ({
alignItems: 'center', alignItems: 'center',
})); }));
const EnvironmentTypography = styled(Typography)<{ enabled: boolean }>( const EnvironmentTypography = styled(Typography, {
({ theme, enabled }) => ({ shouldForwardProp: (prop) => prop !== 'enabled',
fontWeight: enabled ? 'bold' : 'normal', })<{ enabled: boolean }>(({ enabled }) => ({
}), fontWeight: enabled ? 'bold' : 'normal',
); }));
const EnvironmentTypographyHeader = styled(Typography)(({ theme }) => ({ const EnvironmentTypographyHeader = styled(Typography)(({ theme }) => ({
marginRight: theme.spacing(0.5), marginRight: theme.spacing(0.5),