Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 개인정보 동의 토글이 제대로 동작하지 않는 문제 #121

Merged
merged 2 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@types/react-modal": "^3.16.0",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"@uidotdev/usehooks": "^2.4.1",
"autoprefixer": "10.4.14",
"axios": "^1.4.0",
"clsx": "^2.1.0",
Expand Down
15 changes: 15 additions & 0 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.