Fix react error about functional components can't take props

This commit is contained in:
Michael Telatynski 2020-08-29 13:51:43 +01:00
parent b1cc078543
commit da97d8885b

View file

@ -15,13 +15,13 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import React from "react"; import React, {forwardRef} from "react";
export default ({mxEvent}) => { export default forwardRef(({mxEvent}, ref) => {
const text = mxEvent.getContent().body; const text = mxEvent.getContent().body;
return ( return (
<span className="mx_UnknownBody"> <span className="mx_UnknownBody" ref={ref}>
{ text } { text }
</span> </span>
); );
}; });