Fix EkriKomante ref
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import {useCallback, useEffect, useState} from 'react'
|
import {useCallback, useEffect, useState, forwardRef} from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {
|
import {
|
||||||
@@ -13,10 +13,9 @@ import MuiAlert from '@mui/material/Alert'
|
|||||||
|
|
||||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:1337'
|
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:1337'
|
||||||
|
|
||||||
function Alert(props) {
|
const Alert = forwardRef(function Alert(props, ref) {
|
||||||
return <MuiAlert elevation={6} variant='filled' {...props} />
|
return <MuiAlert ref={ref} elevation={6} variant='filled' {...props} />
|
||||||
}
|
})
|
||||||
|
|
||||||
function EkriKomante({session, teks, meteEsKomanteOuve}) {
|
function EkriKomante({session, teks, meteEsKomanteOuve}) {
|
||||||
const {jwt, user} = session
|
const {jwt, user} = session
|
||||||
const {_id} = teks
|
const {_id} = teks
|
||||||
|
|||||||
Reference in New Issue
Block a user