This commit is contained in:
focp212@naver.com
2025-10-31 08:35:50 +09:00
parent 5b28674121
commit 4d40fa1cf7
13 changed files with 92 additions and 90 deletions

View File

@@ -28,7 +28,7 @@ export const SortTypeBox = ({
}
<span key={ option.key }>
<button
className={ `sort-btn ${(sortType === option.key) ? 'active' : ''}` }
className={ `sort-btn ${(sortType === option.key)? 'active': ''}` }
onClick={ () => onClickToSort(option.key) }
>{ option.label }</button>
</span>

View File

@@ -5,7 +5,6 @@ import 'swiper/css';
import { IMAGE_ROOT } from '@/shared/constants/common';
import { UserFavorite } from '@/entities/user/model/types';
import { useStore } from '@/shared/model/store';
import { useLocation } from 'react-router';
import { useTranslation } from 'react-i18next';
/*

View File

@@ -1,9 +1,7 @@
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { useStore } from '@/shared/model/store';
import { IMAGE_ROOT } from '@/shared/constants/common';
import { UserFavorite } from '@/entities/user/model/types';
import { RefObject, useEffect, useState } from 'react';
import { useLocation } from 'react-router';
import { MenuItem } from '../model/types';
import { useTranslation } from 'react-i18next';
import { MenuItems } from '@/entities/common/model/constant';
@@ -35,8 +33,7 @@ export const MenuCategory = ({
}: MenuCategoryProps) => {
const { navigate } = useNavigate();
const { i18n } = useTranslation();
// const location = useLocation();
const [favoriteItems, setFavoriteItems] = useState<Array<UserFavorite>>([]);
const [menuIds, setMenuIds] = useState<Array<number | undefined>>([]);
@@ -85,9 +82,7 @@ export const MenuCategory = ({
useStore.getState().UserStore.setUserFavorite(userFavorite);
setChangeMenuId(`${menuId}-${checked}`);
callFavoiteItems();
// if(location.pathname === PATHS.home){
// }
};
const callFavoiteItems = () => {