Commit afb55513 authored by jang dong hyeok's avatar jang dong hyeok
Browse files

설문응답들의 key를 index로 통일

parent bff0b7f5
...@@ -14,8 +14,8 @@ export const RCheckbox = ({ question }: Props) => { ...@@ -14,8 +14,8 @@ export const RCheckbox = ({ question }: Props) => {
return ( return (
<div className="m-5"> <div className="m-5">
{question.content.choices.map((choice: any) => ( {question.content.choices.map((choice: any, index: number) => (
<div key={choice.text} className=""> <div key={index} className="">
<span className="font-bold">{choice.text}</span> <span className="font-bold">{choice.text}</span>
<span className="ml-3"> <span className="ml-3">
- {result[choice.text] ? result[choice.text] : 0} - {result[choice.text] ? result[choice.text] : 0}
......
...@@ -8,8 +8,8 @@ type Props = { ...@@ -8,8 +8,8 @@ type Props = {
export const RDate = ({ question }: Props) => { export const RDate = ({ question }: Props) => {
return ( return (
<div className="m-5"> <div className="m-5">
{question.answers.map((answer: any) => ( {question.answers.map((answer: any, index: number) => (
<div key={answer} className="font-bold"> <div key={index} className="font-bold">
{answer} {answer}
</div> </div>
))} ))}
......
...@@ -14,8 +14,8 @@ export const RRating = ({ question }: Props) => { ...@@ -14,8 +14,8 @@ export const RRating = ({ question }: Props) => {
return ( return (
<div className="m-5"> <div className="m-5">
<div>{question.content.minRateDescription}</div> <div>{question.content.minRateDescription}</div>
{question.content.choices.map((choice: any) => ( {question.content.choices.map((choice: any, index: number) => (
<div key={choice.text} className=""> <div key={index} className="">
<span className="font-bold">{choice.text}</span> <span className="font-bold">{choice.text}</span>
<span className="ml-3"> <span className="ml-3">
- {result[choice.text] ? result[choice.text] : 0} - {result[choice.text] ? result[choice.text] : 0}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment