mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Fix react error about functional components can't take props
This commit is contained in:
parent
b1cc078543
commit
da97d8885b
@ -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 (
|
||||
<span className="mx_UnknownBody">
|
||||
<span className="mx_UnknownBody" ref={ref}>
|
||||
{ text }
|
||||
</span>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user