diff --git a/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx b/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx index 9dee7a1..9189970 100644 --- a/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx +++ b/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx @@ -86,7 +86,7 @@ export default function MyReviewKebabDropDown({ }`} >
- +
diff --git a/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx b/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx index 77d8842..320f2d4 100644 --- a/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx +++ b/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx @@ -90,7 +90,7 @@ export default function MyWIneKebabDropDown({ }`} >
- +
diff --git a/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx b/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx index 4e9c122..e0ab724 100644 --- a/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx +++ b/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx @@ -91,7 +91,7 @@ export default function ReviewDropdown({ }`} >
- +
diff --git a/src/app/signin/api/KakaoApi.tsx b/src/app/signin/api/KakaoApi.tsx deleted file mode 100644 index f89c2e9..0000000 --- a/src/app/signin/api/KakaoApi.tsx +++ /dev/null @@ -1,25 +0,0 @@ -export default async function KakaoApi() { - try { - const requestBody = { - appKey: process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY, - appSecret: '', - provider: 'KAKAO', - }; - - const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/oauthApps`, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(requestBody), - }); - - if (!response.ok) { - throw new Error(`인증 실패 : ${response.statusText}`); - } - - const data = await response.json(); - return data; - } catch (error) { - console.error('카카오 앱 등록 오류 :', error); - throw error; - } -} diff --git a/src/components/ControlBar.tsx b/src/components/ControlBar.tsx index 121534e..bf9cfc9 100644 --- a/src/components/ControlBar.tsx +++ b/src/components/ControlBar.tsx @@ -29,7 +29,7 @@ export default function ControlBar({ reset = false, label, minLabel, maxLabel, v useEffect(() => { setDragValue(value); - }, [value]); + }, [reset, value]); useEffect(() => { if (value === 0) { diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index f3a8b7b..1b2bdb7 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -19,9 +19,10 @@ interface DropdownProps { ulClassName?: string; liClassName?: string; defaultValue?: DropdownOption | null; + reset?: boolean; } -function Dropdown({ options, onSelect, placeholder, changeButton = false, children, buttonClassName, ulClassName, liClassName, defaultValue = null }: DropdownProps) { +function Dropdown({ options, onSelect, placeholder, changeButton = false, children, buttonClassName, ulClassName, liClassName, defaultValue = null, reset = false }: DropdownProps) { const [isOpen, setIsOpen] = useState(false); const [selected, setSelected] = useState(defaultValue); const dropdownRef = useRef(null); @@ -47,6 +48,10 @@ function Dropdown({ options, onSelect, placeholder, changeButton = false, childr return () => document.removeEventListener('mousedown', handleClickOutside); }, []); + useEffect(() => { + setSelected(defaultValue); + }, [reset, defaultValue]); + return (