expect(reducer(stateBefore,
{
type: patientActions.ON_SEARCH_PATIENT_FOUND,
payload: {
showModal: true,
modalBodyContainer: {}
}
})
)
.toEqual(StateAfter)
modalBodyContainer: <PatientDetails {...action.payload} />,
const Error=()=>{
<div><p>Error!</p></div>
}
const Loading=()=>{
<div><p>Loading...</p></div>
}
export const checking()=>{
render() {
const { data: { loading, error} } = this.props;
if (loading) {
<Loading>
} else if (error) {
<Error>
} else {
return (
{this.props.children}
);
}
}}
const Todos=()=>{
<div><ul>
{this.props.todos.map(({ id, text }) => (
<li key={id}>{text}</li>
))}
</ul></div>
}
<Checking loading={true} error={false}><Todos></Cheking>
refreshInput(event) {
const target = event.target.innerHTML;
//if you clicked a number
if(!isNaN(parseFloat(target)) && isFinite(target)) {
let number = this.state.firstOperand + target
this.setState({
firstOperand: number,
valueInput: number,
})
}
}
printr($clientName,$clientEmail,$clientPhone)