<div className='settings' id='settings'>
<div className='settings_item'>
<h3 className='item-title'>1. Почта </h3>
<div className='item_content'>
..content
</div>
</div>
<div className='settings_item'>
<h3 className='item-title'>2.Телефон </h3>
<div className='item_content'>
..content
</div>
</div>
</div>
const settingContent = document.getElementById('settings')
useEffect(() => {
settingContent?.childNodes.forEach((item, key) => {
const div = document.createElement('div')
div.innerHTML = `${key}`
console.log(item.childNodes.item(0))
item.childNodes.item(0).appendChild(div)
} )
}, [])
useEffect(() => {
settingContent?.querySelectorAll('.item-title').forEach((item, index) => {
item.textContent = `${index + 1}. ${item.textContent}`
})
}, [])