+ {komante.map(({id, username, kontni, sentAt}) => (
+
diff --git a/components/password/reset-dialog.js b/components/password/reset-dialog.js
index a63b90f..b58c704 100644
--- a/components/password/reset-dialog.js
+++ b/components/password/reset-dialog.js
@@ -26,7 +26,7 @@ export default function ResetDialog({lyen, title, activation, content, open, set
if (activation) {
const user = await jwennUserEpiEmail(email)
- localStorage.setItem('user-id', user?._id)
+ localStorage.setItem('user-id', user?.id)
}
setLoading(false)
diff --git a/components/sesyon/koneksyon.js b/components/sesyon/koneksyon.js
index b43731a..2d94c2d 100644
--- a/components/sesyon/koneksyon.js
+++ b/components/sesyon/koneksyon.js
@@ -102,7 +102,7 @@ function Koneksyon({chimen}) {
'content-type': 'application/json'
}
})
- localStorage.setItem('user-id', response?.data?.user?._id)
+ localStorage.setItem('user-id', response?.data?.user?.id)
setSuccess(true)
resetRegisterForm()
} catch (error_) {
diff --git a/components/soumet/chwa-teks.js b/components/soumet/chwa-teks.js
index c7779ee..324c0a2 100644
--- a/components/soumet/chwa-teks.js
+++ b/components/soumet/chwa-teks.js
@@ -37,8 +37,8 @@ function Chwa(props) {
) : (
- {teksLis.length > 0 ? teksLis.map(({_id, tit, awtis}) => (
- handleListItemClick(_id)}>
+ {teksLis.length > 0 ? teksLis.map(({id, tit, awtis}) => (
+ handleListItemClick(id)}>
@@ -78,14 +78,14 @@ export default function ChwaTeks({selectedTeks, setSelectedTeks}) {
setOpen(true)
setLoading(true)
- const jwennTeks = await jwennTeksEpiUserId(user._id)
+ const jwennTeks = await jwennTeksEpiUserId(user.id)
setTeksLis(jwennTeks)
setLoading(false)
}
const handleClose = value => {
- const teks = teksLis.find(({_id}) => _id === value)
+ const teks = teksLis.find(({id}) => id === value)
setSelectedTeks(teks)
setOpen(false)
}
diff --git a/components/soumet/ekri-teks.js b/components/soumet/ekri-teks.js
index 4932d62..7dfdb6e 100644
--- a/components/soumet/ekri-teks.js
+++ b/components/soumet/ekri-teks.js
@@ -128,7 +128,7 @@ function EkriTeks({canAutoTranslate, selectedTeks, setSelectedTeks}) {
if (currentTeksId) {
axios.get(`${API_URL}/teks/${currentTeksId}?_publicationState=preview&_where[published_at_null]=true`)
.then(awtisResponse => {
- if (awtisResponse.data.user._id !== user._id) {
+ if (awtisResponse.data.user.id !== user.id) {
setLoading(false)
return setError({message: 'Opération non autorisée'})
}
@@ -182,7 +182,7 @@ function EkriTeks({canAutoTranslate, selectedTeks, setSelectedTeks}) {
italiano: it === '' ? null : it
},
user,
- awtis: [awtisResponse.data._id],
+ awtis: [awtisResponse.data.id],
tradiksyonOtomatik
}, {
headers
@@ -228,7 +228,7 @@ function EkriTeks({canAutoTranslate, selectedTeks, setSelectedTeks}) {
useEffect(() => {
if (selectedTeks) {
setTradiksyonOtomatik(false)
- setCurrentTeksId(selectedTeks._id)
+ setCurrentTeksId(selectedTeks.id)
setTeksEkri({
awtis: new Intl.ListFormat('fr').format(selectedTeks.awtis.map(({alias}) => alias)),
tit: selectedTeks.tit,
diff --git a/components/teks/denye-teks.js b/components/teks/denye-teks.js
index 5618a86..7086c28 100644
--- a/components/teks/denye-teks.js
+++ b/components/teks/denye-teks.js
@@ -27,7 +27,7 @@ export default function DenyeTeks(teks) {
- {teksKlasePaPibilikasyon.map(t => )}
+ {teksKlasePaPibilikasyon.map(t => )}
diff --git a/components/teks/entegre-mizik.js b/components/teks/entegre-mizik.js
index 9dab612..116d4f0 100644
--- a/components/teks/entegre-mizik.js
+++ b/components/teks/entegre-mizik.js
@@ -121,9 +121,9 @@ function EntegreMizik({anTeks, isMobile}) {
return (
- {!okiMizikID && filteredKouteyAchtey.map(({_id, boutik, url}) => (
+ {!okiMizikID && filteredKouteyAchtey.map(({id, boutik, url}) => (
handleClick(boutik, url)}
diff --git a/pages/awtis.js b/pages/awtis.js
index bb9edbd..6b8df96 100644
--- a/pages/awtis.js
+++ b/pages/awtis.js
@@ -15,7 +15,7 @@ export default function Awtis({pajTotal, awtisPouChakPaj, paj}) {
- {awtisPouChakPaj.map(anAwtis => )}
+ {awtisPouChakPaj.map(anAwtis => )}
diff --git a/pages/paroles/[slug].js b/pages/paroles/[slug].js
index 4620a3c..fc512a9 100644
--- a/pages/paroles/[slug].js
+++ b/pages/paroles/[slug].js
@@ -55,8 +55,8 @@ export async function getServerSideProps({query}) {
throw new Error('San répons')
}
- const {_id} = anTeks
- const komante = await jwennKomanteEpiTeksId(_id)
+ const {id} = anTeks
+ const komante = await jwennKomanteEpiTeksId(id)
return {
props: {