mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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 />
 | 
					            <EventTimelineHeaderTip />
 | 
				
			||||||
            <StyledCol>
 | 
					            <StyledCol>
 | 
				
			||||||
                <ConditionallyRender
 | 
					                <ConditionallyRender
 | 
				
			||||||
                    condition={Boolean(environment)}
 | 
					                    condition={Boolean(environment) && environments.length > 0}
 | 
				
			||||||
                    show={() => (
 | 
					                    show={() => (
 | 
				
			||||||
                        <StyledFilter
 | 
					                        <StyledFilter
 | 
				
			||||||
                            select
 | 
					                            select
 | 
				
			||||||
 | 
				
			|||||||
@ -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),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user