33import { useLocale , useTranslations } from 'next-intl' ;
44import { cn } from '@/lib/utils' ;
55import { Button } from '@/components/ui/button' ;
6+ import { Clock , BookOpen , TrendingUp , Trophy , AlertTriangle } from 'lucide-react' ;
67
78interface QuizResultProps {
89 score : number ;
@@ -35,49 +36,49 @@ export function QuizResult({
3536 const t = useTranslations ( 'quiz.result' ) ;
3637 const getMotivationalMessage = ( ) => {
3738 if ( isIncomplete && answeredCount > 0 ) {
38- return {
39- emoji : '⏱️' ,
40- title : 'Час вийшов' ,
41- message : `Ви відповіли на ${ answeredCount } з ${ total } питань. Результат не зараховано.` ,
42- color : 'text-orange-600 dark:text-orange-400' ,
43- } ;
44- }
45-
39+ return {
40+ icon : < Clock className = "w-14 h-14 text-orange-500" /> ,
41+ title : 'Час вийшов' ,
42+ message : `Ви відповіли на ${ answeredCount } з ${ total } питань. Результат не зараховано.` ,
43+ color : 'text-orange-600 dark:text-orange-400' ,
44+ } ;
45+ }
46+
4647 if ( score === 0 && answeredCount === 0 ) {
47- return {
48- emoji : '⏱️' ,
49- title : t ( 'timeUp.title' ) ,
50- message : t ( 'timeUp.message' ) ,
51- color : 'text-gray-600 dark:text-gray-400' ,
52- } ;
53- }
48+ return {
49+ icon : < Clock className = "w-14 h-14 text-gray-500" /> ,
50+ title : t ( 'timeUp.title' ) ,
51+ message : t ( 'timeUp.message' ) ,
52+ color : 'text-gray-600 dark:text-gray-400' ,
53+ } ;
54+ }
5455
55- if ( score === 0 && answeredCount > 0 ) {
56- return {
57- emoji : '📚' ,
58- title : t ( 'allWrong.title' ) ,
59- message : t ( 'allWrong.message' ) ,
60- color : 'text-red-600 dark:text-red-400' ,
61- } ;
62- }
56+ if ( score === 0 && answeredCount > 0 ) {
57+ return {
58+ icon : < BookOpen className = "w-14 h-14 text-red-500" /> ,
59+ title : t ( 'allWrong.title' ) ,
60+ message : t ( 'allWrong.message' ) ,
61+ color : 'text-red-600 dark:text-red-400' ,
62+ } ;
63+ }
6364
6465 if ( percentage < 50 ) {
6566 return {
66- emoji : '📚' ,
67+ icon : < BookOpen className = "w-14 h-14 text-red-500" /> ,
6768 title : t ( 'needPractice.title' ) ,
6869 message : t ( 'needPractice.message' ) ,
6970 color : 'text-red-600 dark:text-red-400' ,
7071 } ;
7172 } else if ( percentage < 80 ) {
7273 return {
73- emoji : '💪' ,
74+ icon : < TrendingUp className = "w-14 h-14 text-orange-500" /> ,
7475 title : t ( 'goodJob.title' ) ,
7576 message : t ( 'goodJob.message' ) ,
7677 color : 'text-orange-600 dark:text-orange-400' ,
7778 } ;
7879 } else {
7980 return {
80- emoji : '🎉' ,
81+ icon : < Trophy className = "w-14 h-14 text-amber-500" /> ,
8182 title : t ( 'excellent.title' ) ,
8283 message : t ( 'excellent.message' ) ,
8384 color : 'text-green-600 dark:text-green-400' ,
@@ -89,7 +90,7 @@ export function QuizResult({
8990
9091 return (
9192 < div className = "max-w-2xl mx-auto space-y-8" >
92- < div className = "text-center text-6xl " > { motivation . emoji } </ div >
93+ < div className = "flex justify-center " > { motivation . icon } </ div >
9394 { ! isIncomplete && (
9495 < >
9596 < div className = "text-center space-y-2" >
@@ -124,7 +125,7 @@ export function QuizResult({
124125{ violationsCount >= 3 && (
125126 < div className = "p-4 rounded-xl bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800" >
126127 < p className = "text-center text-orange-800 dark:text-orange-200 font-medium" >
127- < span aria-hidden = "true" > ⚠️ </ span > { t ( 'violations' , { count : violationsCount } ) }
128+ < AlertTriangle className = "w-4 h-4 inline" / > { t ( 'violations' , { count : violationsCount } ) }
128129 </ p >
129130 </ div >
130131 ) }
0 commit comments