From 22e68939136978d2719a13309fe48ecb4320f073 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EB=A5=98=EC=A0=95=EC=9A=B0?=
<88191233+jw-r@users.noreply.github.com>
Date: Sat, 21 Dec 2024 19:48:36 +0900
Subject: [PATCH] feat: random quiz (#314)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat: random quiz swiper 구현
* feat: random quiz
* feat: infinite random quiz
---
src/app/(routes)/quiz/random/page.tsx | 10 +-
src/features/category/config/index.ts | 22 +-
.../collection/components/collection.tsx | 3 +-
.../components/create-collection-form.tsx | 8 +-
.../quiz-view/components/quiz-option.tsx | 4 +-
.../quiz/screen/random-quiz-view/index.tsx | 231 ++++++++++--------
src/features/quiz/utils/index.ts | 8 +-
src/requests/collection/client.ts | 11 +
src/requests/collection/hooks.ts | 9 +
src/requests/collection/server.ts | 11 +
src/requests/directory/client.tsx | 2 +-
src/requests/directory/hooks.ts | 4 +-
src/requests/directory/server.ts | 19 ++
src/requests/quiz/hooks.ts | 2 +-
src/shared/configs/endpoint.ts | 2 +
src/types/collection.d.ts | 7 +
src/types/quiz.d.ts | 18 ++
17 files changed, 233 insertions(+), 138 deletions(-)
create mode 100644 src/requests/directory/server.ts
diff --git a/src/app/(routes)/quiz/random/page.tsx b/src/app/(routes)/quiz/random/page.tsx
index e93a8b98..db166b93 100644
--- a/src/app/(routes)/quiz/random/page.tsx
+++ b/src/app/(routes)/quiz/random/page.tsx
@@ -1,10 +1,14 @@
import RandomQuizView from '@/features/quiz/screen/random-quiz-view'
-import { getBookmarkedCollections } from '@/requests/collection/server'
+import { getDirectories } from '@/requests/directory/server'
const RandomQuiz = async () => {
- const bookmarkedCollections = await getBookmarkedCollections()
+ const directories = await getDirectories()
- return