Skip to content

Commit

Permalink
feat: 카테고리 조회에도 map 사용해서 함수 변경 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
gongdongho12 committed Sep 12, 2022
1 parent 0529c5e commit 8650e9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/containers/Category/Category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ interface ICategoryProps {
const Category: FunctionComponent<ICategoryProps> = (props) => {
const [search, setSearch] = useState<string>("")
const [debounceSearch] = useDebounce(search, 500)
const data = useRecoilValue(dataSetState)
const data = useRecoilValue<Map<string, string[]>>(dataSetState)
const navigate = useNavigate()

const dataKeys = useMemo(() => Object.keys(data), [data])
const dataKeys = useMemo<string[]>(() => Array.from(data.keys()), [data])

return (
<DefaultLayout>
Expand Down

0 comments on commit 8650e9f

Please sign in to comment.