mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: remove dead code (#9906)
This commit is contained in:
		
							parent
							
								
									dcb58de728
								
							
						
					
					
						commit
						8d377f76b7
					
				| @ -1,9 +1,7 @@ | ||||
| import { styled, Typography, Grid, Button } from '@mui/material'; | ||||
| import { Link } from 'react-router-dom'; | ||||
| import { GridRow } from 'component/common/GridRow/GridRow'; | ||||
| import { GridCol } from 'component/common/GridCol/GridCol'; | ||||
| import LaunchIcon from '@mui/icons-material/Launch'; | ||||
| import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus'; | ||||
| import { formatApiPath } from 'utils/formatPath'; | ||||
| 
 | ||||
| const StyledInfoLabel = styled(Typography)(({ theme }) => ({ | ||||
|  | ||||
| @ -1,59 +0,0 @@ | ||||
| import { Fragment, type VFC } from 'react'; | ||||
| import type { | ||||
|     PlaygroundConstraintSchema, | ||||
|     PlaygroundRequestSchema, | ||||
| } from 'openapi'; | ||||
| import { objectId } from 'utils/objectId'; | ||||
| import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; | ||||
| import { StrategySeparator } from 'component/common/StrategySeparator/LegacyStrategySeparator'; | ||||
| import { styled } from '@mui/material'; | ||||
| import { ConstraintAccordionView } from 'component/common/LegacyConstraintAccordion/ConstraintAccordionView/ConstraintAccordionView'; | ||||
| import { ConstraintError } from './ConstraintError/LegacyConstraintError'; | ||||
| import { ConstraintOk } from './ConstraintOk/LegacyConstraintOk'; | ||||
| 
 | ||||
| interface IConstraintExecutionProps { | ||||
|     constraints?: PlaygroundConstraintSchema[]; | ||||
|     input?: PlaygroundRequestSchema; | ||||
| } | ||||
| 
 | ||||
| export const ConstraintExecutionWrapper = styled('div')(() => ({ | ||||
|     width: '100%', | ||||
|     display: 'flex', | ||||
|     flexDirection: 'column', | ||||
| })); | ||||
| 
 | ||||
| export const ConstraintExecution: VFC<IConstraintExecutionProps> = ({ | ||||
|     constraints, | ||||
|     input, | ||||
| }) => { | ||||
|     if (!constraints) return null; | ||||
| 
 | ||||
|     return ( | ||||
|         <ConstraintExecutionWrapper> | ||||
|             {constraints?.map((constraint, index) => ( | ||||
|                 <Fragment key={objectId(constraint)}> | ||||
|                     <ConditionallyRender | ||||
|                         condition={index > 0} | ||||
|                         show={<StrategySeparator text='AND' />} | ||||
|                     /> | ||||
|                     <ConstraintAccordionView | ||||
|                         constraint={constraint} | ||||
|                         compact | ||||
|                         renderAfter={ | ||||
|                             <ConditionallyRender | ||||
|                                 condition={constraint.result} | ||||
|                                 show={<ConstraintOk />} | ||||
|                                 elseShow={ | ||||
|                                     <ConstraintError | ||||
|                                         input={input} | ||||
|                                         constraint={constraint} | ||||
|                                     /> | ||||
|                                 } | ||||
|                             /> | ||||
|                         } | ||||
|                     /> | ||||
|                 </Fragment> | ||||
|             ))} | ||||
|         </ConstraintExecutionWrapper> | ||||
|     ); | ||||
| }; | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user