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) => {
return (
<div className="m-5">
{question.content.choices.map((choice: any) => (
<div key={choice.text} className="">
{question.content.choices.map((choice: any, index: number) => (
<div key={index} className="">
<span className="font-bold">{choice.text}</span>
<span className="ml-3">
- {result[choice.text] ? result[choice.text] : 0}
......
......@@ -8,8 +8,8 @@ type Props = {
export const RDate = ({ question }: Props) => {
return (
<div className="m-5">
{question.answers.map((answer: any) => (
<div key={answer} className="font-bold">
{question.answers.map((answer: any, index: number) => (
<div key={index} className="font-bold">
{answer}
</div>
))}
......
......@@ -14,8 +14,8 @@ export const RRating = ({ question }: Props) => {
return (
<div className="m-5">
<div>{question.content.minRateDescription}</div>
{question.content.choices.map((choice: any) => (
<div key={choice.text} className="">
{question.content.choices.map((choice: any, index: number) => (
<div key={index} className="">
<span className="font-bold">{choice.text}</span>
<span className="ml-3">
- {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