Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions app/src/app/history/records/page.tsx

This file was deleted.

63 changes: 0 additions & 63 deletions app/src/features/history/attempt-history-logic.ts

This file was deleted.

224 changes: 0 additions & 224 deletions app/src/features/history/components/attempt-history-page.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/features/history/components/history-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,6 @@ export function HistoryPage() {
</Link>
</header>

<Link
className="flex items-center gap-4 rounded-card border border-border bg-surface p-4 shadow-card"
href="/history/records"
>
<span className="min-w-0 flex-1">
<span className="block text-base font-semibold text-ink">내가 푼 문제</span>
<span className="mt-0.5 block text-xs font-medium text-ink-muted">
지금까지 풀어본 문제와 답을 확인해요
</span>
</span>
<ChevronRightIcon className="size-5 shrink-0 text-ink-muted" />
</Link>

<p aria-live="polite" className="sr-only">
{liveText}
</p>
Expand Down
3 changes: 0 additions & 3 deletions app/src/lib/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ export {
type AnswerSubmitResponse,
type CompletedStep,
type CompletedStepsResponse,
getAttemptHistory,
getCompletedSteps,
getNextQuiz,
getQuizExplanation,
getStepQuiz,
type Highlight,
type QuizAttemptHistoryItem,
type QuizAttemptHistoryResponse,
type QuizChoice,
type QuizDifficulty,
type QuizExplanationResponse,
Expand Down
33 changes: 1 addition & 32 deletions app/src/lib/api/quiz.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiRequest, apiRequestWithMeta, type CursorMeta } from "./client";
import { apiRequest } from "./client";

export type QuizType = "OX" | "MULTIPLE_CHOICE" | "KEYWORD_BLANK";
export type QuizDifficulty = "EASY" | "MEDIUM" | "HARD";
Expand Down Expand Up @@ -99,25 +99,6 @@ export type CompletedStepsResponse = {
steps: CompletedStep[];
};

/**
* 유저가 지금까지 제출한 풀이 시도 1건. `selectedAnswer`는 서버가 이미 사람이 읽을 문구로
* 변환해서 준다(사지선다는 선택지 텍스트, 빈칸은 쉼표로 이어붙인 값) — 프론트는 타입별 분기 없이
* 그대로 표시하면 된다. 이 필드가 도입되기 전 기록은 null.
*/
export type QuizAttemptHistoryItem = {
attemptId: number;
quizId: number;
type: QuizType;
questionText: string;
selectedAnswer: string | null;
isCorrect: boolean;
submittedAt: string;
};

export type QuizAttemptHistoryResponse = {
items: QuizAttemptHistoryItem[];
};

/** courseId 생략 시 서버가 기본 코스를 쓴다(코스 탭에서 코스를 지정해 진입할 때만 넘긴다). */
export function getNextQuiz(courseId?: number): Promise<QuizNextResponse> {
return apiRequest<QuizNextResponse>(
Expand Down Expand Up @@ -154,15 +135,3 @@ export function requestQuizHint(quizId: number): Promise<QuizHintResponse> {
export function getQuizExplanation(quizId: number): Promise<QuizExplanationResponse> {
return apiRequest<QuizExplanationResponse>(`/quizzes/${quizId}/explanation`);
}

/** 내가 푼 문제 히스토리(이슈 191) — 최신순 커서 페이지네이션. */
export function getAttemptHistory(
cursor: string | null,
size?: number,
): Promise<{ data: QuizAttemptHistoryResponse; meta: CursorMeta | null }> {
const query = new URLSearchParams();
if (cursor) query.set("cursor", cursor);
if (size) query.set("size", String(size));
const qs = query.toString();
return apiRequestWithMeta<QuizAttemptHistoryResponse>(`/quizzes/attempts${qs ? `?${qs}` : ""}`);
}
Loading
Loading