Skip to content

Commit

Permalink
Feat: my page Form handleKeyDown 이벤트 핸들러 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
MEGUMMY1 committed Jul 19, 2024
1 parent 62c27bb commit f70d2cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/MyPageInput/MyPageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useSideNavigation } from '@/hooks/useSideNavigation';
import Spinner from '../Spinner/Spinner';
import { useRecoilState } from 'recoil';
import { darkModeState } from '@/states/themeState';
import useEnterSubmit from '@/hooks/useEnterSubmit';

export default function MyPageInput() {
const {
Expand Down Expand Up @@ -94,9 +95,16 @@ export default function MyPageInput() {
if (isLoading) {
return <Spinner />;
}

const handleKeyDown = useEnterSubmit(handleSubmit(onSubmit));

return (
<div className="flex flex-col w-[792px] h-[564px] t:w-[429px] t:h-[556px] m:w-full m:h-full m:pb-[150px] m:px-[16px] ">
<form className="flex flex-col gap-[24px] t:gap-[16px]">
<form
className="flex flex-col gap-[24px] t:gap-[16px]"
onSubmit={handleSubmit(onSubmit)}
onKeyDown={handleKeyDown}
>
<div className="flex m:gap-[15px] p:justify-between t:justify-between">
<Image
src={isDarkMode ? hamburgerWhiteIcon : hamburgerIcon}
Expand Down

0 comments on commit f70d2cd

Please sign in to comment.