adrianhajdin/ecommerce

TypeError on categories.map is undefined.

Danieldo1 opened this issue · 0 comments

i keep getting this TypeError error :

<div className={classes.list}>
> 19 |       {categories.map(category => (
     |                  ^
  20 |         <CategoryCard key={category.id} category={category} />

console logging categories is null. Parent [SLUG] index is also null all the payloads are followed the same as in the walkthrough.
Ran generate payloads and types and all are successful. don't get why categories are undefined/null and nothing renders unless i make the categories optional
Does anyone else have this issue/know how to fix it ?