Skip to content

Commit

Permalink
feat: random quiz (#285)
Browse files Browse the repository at this point in the history
* feat: slider

* feat: random quiz swiper

* feat: random-quiz
  • Loading branch information
jw-r authored Nov 30, 2024
1 parent 878f34f commit b99ece7
Show file tree
Hide file tree
Showing 12 changed files with 427 additions and 13,602 deletions.
256 changes: 19 additions & 237 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"remark-gfm": "^4.0.0",
"remirror": "^2.0.39",
"strip-markdown": "^6.0.0",
"swiper": "^11.1.15",
"tailwind-merge": "^2.2.2",
"tailwind-scrollbar-hide": "^1.1.7",
"tailwindcss-animate": "^1.0.7",
Expand Down
2 changes: 1 addition & 1 deletion src/app/(routes)/quiz/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const QuizDetailPage = ({ params, searchParams }: Props) => {
<>
{quizType === 'today' && <QuizView quizzes={quizzes} />}
{/* {quizType === 'today' && <QuizView quizzes={quizSet.quizzes} />} */}
{quizType === 'random' && <RandomQuizView />}
{/* {quizType === 'random' && <RandomQuizView />} */}
</>
)
}
Expand Down
7 changes: 7 additions & 0 deletions src/app/(routes)/quiz/random/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import RandomQuizView from '@/features/quiz/screen/random-quiz-view'

const RandomQuiz = () => {
return <RandomQuizView />
}

export default RandomQuiz
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface Props {
onNext: () => void
}

const BombWrongAnswerDialog = ({
const WrongAnswerDialog = ({
isOpen,
setIsOpen,
answer,
Expand Down Expand Up @@ -68,4 +68,4 @@ const BombWrongAnswerDialog = ({
)
}

export default BombWrongAnswerDialog
export default WrongAnswerDialog
4 changes: 2 additions & 2 deletions src/features/quiz/screen/bomb-quiz-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import BombQuiz from '../components/bomb-quiz'
import BombAnimation from '../components/bomb-animation'
import { useState } from 'react'
import Loading from '@/shared/components/custom/loading'
import BombWrongAnswerDialog from '../components/bomb-wrong-answer-dialog'
import WrongAnswerDialog from '../components/wrong-answer-dialog'
import { getAnswerText } from '../utils'
import { cn } from '@/shared/lib/utils'

Expand Down Expand Up @@ -132,7 +132,7 @@ const BombQuizView = () => {
</div>
</div>

<BombWrongAnswerDialog
<WrongAnswerDialog
isOpen={openExplanation}
setIsOpen={setOpenExplanation}
answer={getAnswerText(currentQuizInfo.answer)}
Expand Down
5 changes: 0 additions & 5 deletions src/features/quiz/screen/random-quiz-view.tsx

This file was deleted.

Loading

0 comments on commit b99ece7

Please sign in to comment.