const initCategories = async () => {
try {
const data = await getCategories()
const collect = await getCollect(data)
setCategories(data)
setValues({ ...values, loaded: true })
} catch (error) {
setValues({ ...values, error })
}
}
const getCollect = async data => {
return await fetch('https://site.com')
}