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
5 changes: 5 additions & 0 deletions app/(main)/my-page/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import MyPage from "@/components/features/my-page/MyPage";

export default function Page() {
return <MyPage />;
}
85 changes: 85 additions & 0 deletions components/features/my-page/MyPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
"use client";

import Link from "next/link";
import { ChevronRight } from "lucide-react";
import { Skeleton } from "@/components/ui/skeleton";

function SectionHeader({ title, href }: { title: string; href?: string }) {
return (
<div className="mb-4 flex items-center justify-between">
<h2 className="text-base font-semibold text-foreground">{title}</h2>
{href && (
<Link
href={href}
className="flex items-center gap-0.5 text-sm text-muted-foreground transition-colors hover:text-foreground"
>
전체 보기
<ChevronRight className="h-4 w-4" />
</Link>
)}
</div>
);
}

function SkeletonCards({ count = 4 }: { count?: number }) {
return (
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4">
{Array.from({ length: count }).map((_, i) => (
<Skeleton key={i} className="h-28 rounded-xl" />
))}
</div>
);
}

export default function MyPage() {
return (
<div className="mx-auto max-w-5xl space-y-10 px-4 py-8 lg:px-8">
<div>
<h1 className="text-xl font-bold tracking-[-0.01em] text-foreground md:text-2xl">
마이페이지
</h1>
<p className="mt-1 text-sm font-medium text-muted-foreground">
내 학습 현황과 추천 콘텐츠를 한눈에 확인해 보세요.
</p>
</div>

{/* 1. 로드맵 */}
<section>
<SectionHeader title="로드맵" />
<Skeleton className="h-44 rounded-xl" />
</section>

{/* 2. 스크랩한 글들 */}
<section>
<SectionHeader title="스크랩한 글들" />
<SkeletonCards />
</section>

{/* 3. 틀린 퀴즈들 */}
<section>
<SectionHeader title="틀린 퀴즈들" />
<SkeletonCards />
</section>

{/* 4. 추천 */}
<section className="space-y-8">
<SectionHeader title="추천" />

<div>
<SectionHeader title="홈 글" />
<SkeletonCards />
</div>

<div>
<SectionHeader title="유튜브" />
<SkeletonCards />
</div>

<div>
<SectionHeader title="서적" />
<SkeletonCards />
</div>
</section>
</div>
);
}
2 changes: 2 additions & 0 deletions components/layout/TopNavVariant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Flame,
BookOpen,
Briefcase,
LayoutDashboard,
type LucideIcon,
} from "lucide-react";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
Expand Down Expand Up @@ -57,6 +58,7 @@ const ALL_NAV_ITEMS: { href: string; label: string; icon: LucideIcon }[] = [
{ href: "/trends", label: "트렌드", icon: Flame },
{ href: "/history", label: "히스토리", icon: BookOpen },
{ href: "/report", label: "리포트", icon: TrendingUp },
{ href: "/my-page", label: "마이페이지", icon: LayoutDashboard },
];

const NAV_ITEMS = ALL_NAV_ITEMS.filter(
Expand Down
Loading