@@ -58,7 +58,7 @@ const fakeTodayQuiz: QuizData = {
5858 commentary : "let은 ES6에서 도입된 블록 스코프 변수 선언 키워드입니다." ,
5959 category : {
6060 main : "FRONTEND" ,
61- sub : "Programming "
61+ sub : "SoftwareDesign "
6262 } ,
6363 quizType : "MULTIPLE_CHOICE" ,
6464 quizLevel : "NORMAL"
@@ -147,7 +147,6 @@ const TodayQuizSection: React.FC = () => {
147147 } ,
148148 enabled : ! ! ( subscriptionId && quizId ) ,
149149 } ) ;
150-
151150
152151 const handleSubmit = async ( e : React . FormEvent ) => {
153152 e . preventDefault ( ) ;
@@ -233,7 +232,6 @@ const TodayQuizSection: React.FC = () => {
233232 } else if ( 'answerId' in submitResponse ) {
234233 answerId = ( submitResponse as any ) . answerId . toString ( ) ;
235234 } else {
236- // 응답 전체가 answerId일 수 있음
237235 answerId = ( submitResponse as any ) . toString ( ) ;
238236 }
239237 } else {
@@ -269,9 +267,8 @@ const TodayQuizSection: React.FC = () => {
269267 } catch ( feedbackError ) {
270268 console . error ( 'AI 피드백 요청 실패:' , feedbackError ) ;
271269
272- // 피드백 실패 시 기본 결과 표시
273270 const errorResult : AnswerResult = {
274- isCorrect : false , // 기본값
271+ isCorrect : false ,
275272 answer : displayQuiz . answer || '' ,
276273 commentary : displayQuiz . commentary ,
277274 aiFeedback : 'AI 피드백을 가져오는데 실패했습니다.'
@@ -411,26 +408,26 @@ const TodayQuizSection: React.FC = () => {
411408
412409 { /* Question Box */ }
413410 < div className = "bg-brand-50 border border-brand-200 rounded-xl p-4 sm:p-6 text-base sm:text-lg font-medium text-gray-800 mb-8 max-w-4xl mx-auto text-left" >
414- < div className = "flex items-start justify-between mb-4" >
415- < strong className = "flex-1 leading-relaxed" > Q. { displayQuiz ?. question } </ strong >
416- { /* 카테고리 & 난이도 표시 */ }
417- < div className = "ml-2 sm:ml-4 flex flex-col sm:flex-row gap-1 sm:gap-2 flex-shrink-0" >
418- { displayQuiz ?. category ?. main && (
419- < div className = "bg-blue-100 text-blue-800 px-2 sm:px-3 py-1 rounded-full text-xs sm:text-sm font-medium" >
420- { getMainCategoryLabel ( displayQuiz . category . main ) }
421- </ div >
422- ) }
423- { displayQuiz ?. category ?. sub && (
424- < div className = "bg-purple-100 text-purple-800 px-2 sm:px-3 py-1 rounded-full text-xs sm:text-sm font-medium" >
425- { getSubCategoryLabel ( displayQuiz . category . sub ) }
426- </ div >
427- ) }
428- { displayQuiz ?. quizLevel && (
429- < div className = { `px-2 sm:px-3 py-1 rounded-full text-xs sm:text-sm font-medium ${ getDifficultyDisplay ( displayQuiz . quizLevel ) . color } ` } >
430- { getDifficultyDisplay ( displayQuiz . quizLevel ) . label }
431- </ div >
432- ) }
433- </ div >
411+ < div className = "mb-4" >
412+ < strong className = "block leading-relaxed" > Q. { displayQuiz ?. question } </ strong >
413+ </ div >
414+ { /* 카테고리 & 난이도 표시 - 질문 아래 */ }
415+ < div className = "flex flex-wrap gap-1 sm:gap-2" >
416+ { displayQuiz ?. category ?. main && (
417+ < div className = "bg-blue-100 text-blue-800 px-2 sm:px-3 py-1 rounded-full text-xs sm:text-sm font-medium" >
418+ { getMainCategoryLabel ( displayQuiz . category . main ) }
419+ </ div >
420+ ) }
421+ { displayQuiz ?. category ?. sub && (
422+ < div className = "bg-purple-100 text-purple-800 px-2 sm:px-3 py-1 rounded-full text-xs sm:text-sm font-medium" >
423+ { getSubCategoryLabel ( displayQuiz . category . sub ) }
424+ </ div >
425+ ) }
426+ { displayQuiz ? .quizLevel && (
427+ < div className = { `px-2 sm:px-3 py-1 rounded-full text-xs sm:text-sm font-medium $ {getDifficultyDisplay ( displayQuiz . quizLevel ) . color } ` } >
428+ { getDifficultyDisplay ( displayQuiz . quizLevel ) . label }
429+ </ div >
430+ ) }
434431 </ div >
435432 </ div >
436433
0 commit comments