import React from 'react' import './Controls.css' import emoji from 'react-easy-emoji' import { connect } from 'react-redux' import { startConversation } from 'Actions/actions' import { animated, Spring } from 'react-spring' import { makeJsx } from 'Engine/evaluation' function Controls({ blockingInputControls, controls, startConversation }) { return (
{blockingInputControls && (

{blockingInputControls[0].message}

)} {!blockingInputControls && ( {styles => controls?.length ? (
{do { let { level, solution, evaluated } = controls[0] ;<>

{level === 'avertissement' ? 'Attention !' : 'Information'}

{makeJsx(evaluated)}

{solution && (
{emoji('💡')}
)} }}
) : null }
)}
) } export default connect( (state, props) => ({ key: props.language }), { startConversation } )(Controls)