import React from "react" ; interface ErrorProps { error : string | null ; } const Error = ( { error } ) => { return ( < React . Fragment > { error && < div className = "error" > { error } < /div>} < /React.Fragment>); } ; export default Error ;