Skip to content

Commit

Permalink
fix: 개인정보동의 토글이 동작하지 않는 문제
Browse files Browse the repository at this point in the history
  • Loading branch information
2yunseong committed Mar 3, 2024
1 parent a6ab4cb commit ce07cef
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import type {
ApplicationQuestion,
ApplicationRadioForCheck,
} from "@/src/constants/application/type";
import { useLocalStorage } from "@/src/hooks/useLocalstorage.hook";
import { cn } from "@/src/utils/cn";
import Link from "next/link";
import { ChangeEvent } from "react";
import { useLocalStorage } from "@uidotdev/usehooks";

interface RadioCellProps {
applicationQuestion: ApplicationQuestion;
Expand All @@ -20,6 +21,11 @@ const RadioCell = ({
radioForCheckData.name,
"동의하지 않습니다."
);

const onSelectRadio = (e: ChangeEvent<HTMLInputElement>) => {
setRadio(e.target.value);
};

return (
<div className="flex-1">
<Link
Expand All @@ -46,9 +52,7 @@ const RadioCell = ({
id={radioForCheckData.name + radioForCheckData.value[0]}
checked={radio === radioForCheckData.value[0]}
value={radioForCheckData.value[0]}
onChange={(e) => {
setRadio(e.target.value);
}}
onChange={onSelectRadio}
/>
<label
className="mr-4"
Expand All @@ -63,9 +67,7 @@ const RadioCell = ({
id={radioForCheckData.name + radioForCheckData.value[1]}
checked={radio === radioForCheckData.value[1]}
value={radioForCheckData.value[1]}
onChange={(e) => {
setRadio(e.target.value);
}}
onChange={onSelectRadio}
/>
<label
className="mr-4"
Expand Down

0 comments on commit ce07cef

Please sign in to comment.