diff --git a/public/61811896.txt b/public/61811896.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/[name]/(Main)/page.tsx b/src/app/[name]/(Main)/page.tsx index ece8712..7eb68d6 100644 --- a/src/app/[name]/(Main)/page.tsx +++ b/src/app/[name]/(Main)/page.tsx @@ -53,6 +53,17 @@ const MenuIndex = () => { } }, [isInitialMount, setSearch, setSelectedIngredients, setSelectedDeliveryId, setSorting]); + useEffect(() => { + console.log('selectedCategory', selectedCategory); + + if (categoriesData?.data && selectedCategory === '0') { + setSelectedCategory(categoriesData?.data?.[0]?.id) + } + + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [selectedCategory, categoriesData]) + + const onScroll = useCallback(() => { if (!wrapperRef?.current?.parentElement?.parentElement?.scrollTop || !smallCategoriesRef.current?.offsetTop) return;