Skip to content

Commit

Permalink
fix: console warnings and errors related to event timeline and strate…
Browse files Browse the repository at this point in the history
…gy 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.
  • Loading branch information
nunogois authored Nov 8, 2024
1 parent b52dcb3 commit f669d96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const EventTimelineHeader = ({
<EventTimelineHeaderTip />
<StyledCol>
<ConditionallyRender
condition={Boolean(environment)}
condition={Boolean(environment) && environments.length > 0}
show={() => (
<StyledFilter
select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit f669d96

Please sign in to comment.