-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: quiz-session socket 연결 * fix: socket transports 방식 websocket으로 고정 * feat: User Type 식별 및 퀴즈 시작 소켓 연결 * fix: 퀴즈 로딩 화면 UI 수정 * fix: quizLoading UI 변경 * feat: spin keyframe 추가 * feat: quiz loading UI 추가 * feat: quiz end UI 추가 * feat: quiz end 상태 추가
- Loading branch information
1 parent
5ed80a8
commit 39eb220
Showing
7 changed files
with
128 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface Choice { | ||
id: number; | ||
quizId: number; | ||
content: string; | ||
isCorrect: boolean; | ||
position: number; | ||
} | ||
interface QuizData { | ||
id: string; | ||
content: string; | ||
choices: Choice[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export default function QuizLoading() { | ||
return ( | ||
<div className="min-h-screen bg-blue-100 p-4"> | ||
<div className="max-w-2xl mx-auto mt-12 p-16 "> | ||
<div className="text-center mb-8"> | ||
<span className="text-4xl font-bold">🏆 Leader Board </span> | ||
</div> | ||
|
||
<div className="flex justify-center items-end gap-20 mb-12 border-2 bg-gradient-to-b from-blue-50 to-white rounded-2xl p-4"> | ||
<div className="flex flex-col items-center gap-2"> | ||
<div className="h-24 w-12 bg-gradient-to-t from-blue-200 to-blue-100 rounded-base" /> | ||
</div> | ||
<div className="flex flex-col items-center gap-2"> | ||
<div className="h-32 w-12 bg-gradient-to-t from-blue-300 to-blue-200 rounded-base" /> | ||
</div> | ||
<div className="flex flex-col items-center gap-2"> | ||
<div className="h-20 w-12 bg-gradient-to-t from-blue-100 to-blue-50 rounded-base" /> | ||
</div> | ||
</div> | ||
|
||
<div className="flex flex-col justify-center items-center gap-8"> | ||
<span className="text-bold-xl">나는 몇 등?</span> | ||
<span className="font-semibold text-4xl text-blue-600">#10</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
61 changes: 39 additions & 22 deletions
61
packages/client/src/pages/quiz-session/ui/QuizLoading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,48 @@ | ||
export default function QuizLoading() { | ||
const QuizLoading = () => { | ||
return ( | ||
<div className="min-h-screen bg-blue-100 p-4"> | ||
<div className="max-w-4xl mx-auto mt-12 "> | ||
<div className="text-center mb-8"> | ||
<span className="text-bold-xl">Leader Board</span> | ||
</div> | ||
<div className="min-h-screen w-full flex flex-col items-center justify-center bg-gradient-to-b from-slate-50 to-white"> | ||
<div className="relative p-12 rounded-3xl bg-white/30 backdrop-blur-lg shadow-[0_8px_30px_rgb(0,0,0,0.05)] border border-white/20"> | ||
<div className="relative flex flex-col items-center"> | ||
<div className="relative w-32 h-32"> | ||
<div className="absolute inset-0 flex items-center justify-center"> | ||
<div className="w-20 h-20 rounded-full border-2 border-transparent border-t-blue-500 border-l-blue-500 animate-spin" /> | ||
</div> | ||
|
||
<div className="flex justify-center items-end gap-20 mb-12 border-2 border-white rounded-2xl p-4"> | ||
<div className="flex flex-col items-center gap-2"> | ||
<div className="h-24 w-12 bg-white rounded-base" /> | ||
<span>2</span> | ||
</div> | ||
<div className="flex flex-col items-center gap-2"> | ||
<div className="h-32 w-12 bg-white rounded-base" /> | ||
<span>1</span> | ||
<div className="absolute inset-0 flex items-center justify-center animate-spin-slow"> | ||
<div className="absolute w-2 h-2 rounded-full bg-blue-400 top-0" /> | ||
<div className="absolute w-2 h-2 rounded-full bg-indigo-400 right-0" /> | ||
<div className="absolute w-2 h-2 rounded-full bg-violet-400 bottom-0" /> | ||
<div className="absolute w-2 h-2 rounded-full bg-purple-400 left-0" /> | ||
</div> | ||
|
||
<div className="absolute inset-0 flex items-center justify-center"> | ||
<div className="w-3 h-3 rounded-full bg-blue-500 animate-pulse" /> | ||
</div> | ||
</div> | ||
<div className="flex flex-col items-center gap-2"> | ||
<div className="h-20 w-12 bg-white rounded-base" /> | ||
<span>3</span> | ||
|
||
<div className="mt-8 text-center"> | ||
<h2 className="text-xl font-medium text-slate-700 tracking-wide"> | ||
다음 퀴즈로 이동 중 입니다. | ||
</h2> | ||
|
||
<div className="flex items-center justify-center gap-1.5 mt-3"> | ||
{[0, 1, 2].map((i) => ( | ||
<div | ||
key={i} | ||
className="w-1.5 h-1.5 rounded-full bg-gradient-to-r from-blue-500 to-violet-500 animate-bounce" | ||
style={{ animationDelay: `${i * 150}ms` }} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="flex flex-col justify-center items-center gap-8"> | ||
<span className="text-bold-xl">나는 몇 등?</span> | ||
<span className="font-semibold text-4xl text-primary">#10</span> | ||
<p className="mt-4 text-sm text-slate-500 font-medium animate-pulse"> | ||
잠시만 기다려주세요... | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
}; | ||
|
||
export default QuizLoading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters