diff --git a/src/pages/survey/[surveyId]/index.tsx b/src/pages/survey/[surveyId]/index.tsx index 41c6184..022b571 100644 --- a/src/pages/survey/[surveyId]/index.tsx +++ b/src/pages/survey/[surveyId]/index.tsx @@ -9,6 +9,15 @@ import ExternalPageWrapper from 'layout/ExternalRouteWrapper'; export async function getServerSideProps(context: NextPageContext) { const surveyData = await getSurveyData(context.query.surveyId as string); + if (surveyData) { + surveyData.questions = surveyData?.questions.map((question) => { + return { + ...question, + answer: '', + }; + }); + } + return { props: { initialData: JSON.parse(JSON.stringify(surveyData)),