From a756241d5ea4f741b78268858aad939b5ba79733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sat, 19 Feb 2022 21:34:20 +0400 Subject: [PATCH] Fix EkriKomante ref --- components/komante/ekri-komante.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/komante/ekri-komante.js b/components/komante/ekri-komante.js index db6d734..2e41715 100644 --- a/components/komante/ekri-komante.js +++ b/components/komante/ekri-komante.js @@ -1,4 +1,4 @@ -import {useCallback, useEffect, useState} from 'react' +import {useCallback, useEffect, useState, forwardRef} from 'react' import PropTypes from 'prop-types' import axios from 'axios' import { @@ -13,10 +13,9 @@ import MuiAlert from '@mui/material/Alert' const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:1337' -function Alert(props) { - return -} - +const Alert = forwardRef(function Alert(props, ref) { + return +}) function EkriKomante({session, teks, meteEsKomanteOuve}) { const {jwt, user} = session const {_id} = teks