From da97d8885b8a9145c933d7cce7c713446f817f6c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 29 Aug 2020 13:51:43 +0100 Subject: [PATCH] Fix react error about functional components can't take props --- src/components/views/messages/UnknownBody.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/messages/UnknownBody.js b/src/components/views/messages/UnknownBody.js index 6c00921b45..786facc340 100644 --- a/src/components/views/messages/UnknownBody.js +++ b/src/components/views/messages/UnknownBody.js @@ -15,13 +15,13 @@ See the License for the specific language governing permissions and 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; return ( - + { text } ); -}; +});