Replace _id by id
This commit is contained in:
@@ -18,7 +18,7 @@ const Alert = forwardRef(function Alert(props, ref) {
|
||||
})
|
||||
function EkriKomante({session, teks, meteEsKomanteOuve}) {
|
||||
const {jwt, user} = session
|
||||
const {_id} = teks
|
||||
const {id} = teks
|
||||
const [komante, meteKomante] = useState({kontni: ''})
|
||||
const [ere, meteEre] = useState('')
|
||||
const [sikse, meteSikse] = useState('')
|
||||
@@ -43,8 +43,8 @@ function EkriKomante({session, teks, meteEsKomanteOuve}) {
|
||||
|
||||
axios.post(`${API_URL}/komante`, {
|
||||
kontni,
|
||||
teks: _id,
|
||||
user: user._id
|
||||
teks: id,
|
||||
user: user.id
|
||||
}, {
|
||||
headers
|
||||
})
|
||||
|
||||
@@ -38,8 +38,8 @@ const StyledList = styled(List)((
|
||||
export default function KomanteList({komante}) {
|
||||
return (
|
||||
<StyledList className={classes.root}>
|
||||
{komante.map(({_id, username, kontni, sentAt}) => (
|
||||
<div key={_id}>
|
||||
{komante.map(({id, username, kontni, sentAt}) => (
|
||||
<div key={id}>
|
||||
<ListItemText
|
||||
primary={
|
||||
<Typography gutterBottom style={{fontWeight: 'bold'}} variant='body1'>
|
||||
|
||||
Reference in New Issue
Block a user