Estoy tratando de agregar un botón al final de props.text pero al usar este código pone [objeto Objeto] al final del texto en lugar del botón "establecer líneas"
function UnchangedText(props) { const setLines = <button>Set Lines</button>; return ( <div className={props.className}> <span></span> <pre>{ props.text.includes("\\n") ? props.text + setLines : props.text }</pre> </div> ); }prueba esto
function UnchangedText(props) { const setLines = <button>Set Lines</button>; return ( <div className={props.className}> <span></span> <pre>{ props.text.includes("\\n") ? <>{props.text} {setLines} </> : props.text }</pre> </div> ); }