diff --git a/frontend/src/components/recruitment/MultipleFilter.tsx b/frontend/src/components/recruitment/MultipleFilter.tsx index b285358..3389e02 100644 --- a/frontend/src/components/recruitment/MultipleFilter.tsx +++ b/frontend/src/components/recruitment/MultipleFilter.tsx @@ -1,6 +1,6 @@ 'use client' -import { use, useEffect, useState } from 'react' +import { SetStateAction, useEffect, useState } from 'react' import { useRecoilState } from 'recoil' import Select, { StylesConfig } from 'react-select' import Image from 'next/image' @@ -13,7 +13,6 @@ import { SkillType, FilterType, } from '../../utils/types' -import { set } from 'react-hook-form' const positionOptions = Object.values(Position).map((position) => ({ value: position, @@ -30,6 +29,11 @@ type OptionType = { label: string } +type SearchTextType = { + keyword: string + value: string +} + const styles: StylesConfig = { control: (provided) => ({ ...provided, @@ -50,7 +54,7 @@ const styles: StylesConfig = { // eslint-disable-next-line react/prop-types export default function MultipleFilter() { const [filter, setFilter] = useRecoilState(filterState) - const [keyword, setKeyword] = useState('') + const [keyword, setKeyword] = useState('') const handleKeywordChange = (e: any) => { setKeyword(e.target.value) @@ -75,7 +79,9 @@ export default function MultipleFilter() { useEffect(() => { const searchText = sessionStorage.getItem('keyword') - setKeyword(searchText) + if (searchText) { + setKeyword(searchText) + } }, []) return ( @@ -134,15 +140,25 @@ export default function MultipleFilter() { {/* Search Input Field */}
-
-
+ +
+