Skip to content

Commit

Permalink
hotfix: 답변 페이지 오류 수정(Suspense)
Browse files Browse the repository at this point in the history
  • Loading branch information
nestiank committed Apr 2, 2024
1 parent 7a20bf7 commit ecf66c1
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions src/app/answer/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react'
import client from '@/utils/client'
import { useSearchParams } from "next/navigation";
import styles from "./answer.module.css";
import { Suspense } from "react";


const LoadingSpinner = () => {
Expand Down Expand Up @@ -43,45 +44,47 @@ const Answer = () => {
}

return (
<div style={{color: '#463E39', marginTop: '8px'}}>
<div className={styles.logo}>
<h3>
<span>제22대 국회의원 후보자에게 묻습니다</span>
</h3>
</div>
<hr />
<div className={styles.container}>
{/* <h3>답변할 수 있는 시한이 지났습니다.</h3> */}
<h3>강간죄 구성 요건을 &apos;동의&apos; 여부로 바꾸는데 동의하십니까?</h3>
<div style={{margin: '6px 0', fontSize: '1.2rem'}}>
<label>
<input
type="radio"
value={'yes'}
checked={choice === 'yes'}
onChange={e => setChoice(e.target.value)}
/>
동의합니다.
</label>
</div>
<div style={{margin: '6px 0', fontSize: '1.2rem'}}>
<label>
<input
type="radio"
value={'no'}
checked={choice === 'no'}
onChange={e => setChoice(e.target.value)}
/>
동의하지 않습니다.
</label>
<Suspense>
<div style={{color: '#463E39', marginTop: '8px'}}>
<div className={styles.logo}>
<h3>
<span>제22대 국회의원 후보자에게 묻습니다</span>
</h3>
</div>
<hr />
<div className={styles.container}>
{/* <h3>답변할 수 있는 시한이 지났습니다.</h3> */}
<h3>강간죄 구성 요건을 &apos;동의&apos; 여부로 바꾸는데 동의하십니까?</h3>
<div style={{margin: '6px 0', fontSize: '1.2rem'}}>
<label>
<input
type="radio"
value={'yes'}
checked={choice === 'yes'}
onChange={e => setChoice(e.target.value)}
/>
동의합니다.
</label>
</div>
<div style={{margin: '6px 0', fontSize: '1.2rem'}}>
<label>
<input
type="radio"
value={'no'}
checked={choice === 'no'}
onChange={e => setChoice(e.target.value)}
/>
동의하지 않습니다.
</label>
</div>

<div style={{marginTop: '20px'}}>
<button className={styles.submit} onClick={() => response()}>저장</button>
<div style={{marginTop: '20px'}}>
<button className={styles.submit} onClick={() => response()}>저장</button>
</div>
{loading && <LoadingSpinner />}
</div>
{loading && <LoadingSpinner />}
</div>
</div>
</Suspense>
)
}

Expand Down

0 comments on commit ecf66c1

Please sign in to comment.