수정
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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';
|
||||
|
||||
/*
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user