Skip to content

Commit 5d44313

Browse files
committed
Feat: 기사 기바 퀴즈 제공 기능 추가
1 parent ff574c3 commit 5d44313

File tree

4 files changed

+497
-23
lines changed

4 files changed

+497
-23
lines changed

app/articles/[id]/page.tsx

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
Share2,
1717
BookOpen,
1818
FileText,
19+
Target,
1920
} from "lucide-react"
2021
import { ArticleDetail, ArticleDetailResponse, SummaryLevel } from "@/types/article"
2122
import { useAuth } from "@/contexts/AuthContext"
@@ -278,32 +279,58 @@ export default function ArticleDetailPage() {
278279
</Card>
279280
)}
280281

281-
{/* View Original Article Button */}
282-
<Card className="bg-gradient-to-r from-emerald-50 to-teal-50 border-emerald-200">
283-
<CardContent className="p-6">
284-
<div className="flex flex-col sm:flex-row items-center justify-between gap-4">
285-
<div className="flex items-center space-x-3">
286-
<div className="w-12 h-12 bg-emerald-600 rounded-full flex items-center justify-center flex-shrink-0">
287-
<FileText className="w-6 h-6 text-white" />
282+
{/* Action Cards */}
283+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
284+
{/* View Original Article Button */}
285+
<Card className="bg-gradient-to-r from-emerald-50 to-teal-50 border-emerald-200">
286+
<CardContent className="p-6">
287+
<div className="flex flex-col items-center justify-between gap-4 h-full">
288+
<div className="flex items-center space-x-3 w-full">
289+
<div className="w-12 h-12 bg-emerald-600 rounded-full flex items-center justify-center flex-shrink-0">
290+
<FileText className="w-6 h-6 text-white" />
291+
</div>
292+
<div>
293+
<h4 className="font-semibold text-emerald-900">원문 기사</h4>
294+
<p className="text-sm text-emerald-700">전체 내용 읽기</p>
295+
</div>
288296
</div>
289-
<div>
290-
<h4 className="font-semibold text-emerald-900">원문 기사가 궁금하신가요?</h4>
291-
<p className="text-sm text-emerald-700">
292-
요약된 내용 외에 전체 기사를 읽어보세요
293-
</p>
297+
<Button
298+
onClick={() => router.push(`/articles/${articleId}/original`)}
299+
size="lg"
300+
className="bg-emerald-600 hover:bg-emerald-700 text-white w-full"
301+
>
302+
<FileText className="w-4 h-4 mr-2" />
303+
원문 기사 보기
304+
</Button>
305+
</div>
306+
</CardContent>
307+
</Card>
308+
309+
{/* Article Quiz Button */}
310+
<Card className="bg-gradient-to-r from-purple-50 to-pink-50 border-purple-200">
311+
<CardContent className="p-6">
312+
<div className="flex flex-col items-center justify-between gap-4 h-full">
313+
<div className="flex items-center space-x-3 w-full">
314+
<div className="w-12 h-12 bg-purple-600 rounded-full flex items-center justify-center flex-shrink-0">
315+
<Target className="w-6 h-6 text-white" />
316+
</div>
317+
<div>
318+
<h4 className="font-semibold text-purple-900">AI 퀴즈</h4>
319+
<p className="text-sm text-purple-700">내용 이해도 확인</p>
320+
</div>
294321
</div>
322+
<Button
323+
onClick={() => router.push(`/articles/${articleId}/quiz`)}
324+
size="lg"
325+
className="bg-purple-600 hover:bg-purple-700 text-white w-full"
326+
>
327+
<Target className="w-4 h-4 mr-2" />
328+
퀴즈 풀기
329+
</Button>
295330
</div>
296-
<Button
297-
onClick={() => router.push(`/articles/${articleId}/original`)}
298-
size="lg"
299-
className="bg-emerald-600 hover:bg-emerald-700 text-white whitespace-nowrap"
300-
>
301-
<FileText className="w-4 h-4 mr-2" />
302-
원문 기사 보기
303-
</Button>
304-
</div>
305-
</CardContent>
306-
</Card>
331+
</CardContent>
332+
</Card>
333+
</div>
307334

308335
{/* Info Card */}
309336
<Card className="bg-blue-50 border-blue-200">

0 commit comments

Comments
 (0)