From b2237715541a60adb4b79c67416b252690aaee31 Mon Sep 17 00:00:00 2001 From: shinya Date: Mon, 23 Jun 2025 19:21:15 +0800 Subject: [PATCH] feat: remove homepage recommends --- src/app/page.tsx | 54 ------------------------------- src/components/CollectionCard.tsx | 40 ----------------------- 2 files changed, 94 deletions(-) delete mode 100644 src/components/CollectionCard.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index de74eed..00e5bff 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,21 +1,11 @@ 'use client'; -import { - Film, - MessageCircleHeart, - MountainSnow, - Star, - Swords, - Tv, - VenetianMask, -} from 'lucide-react'; import { Suspense, useEffect, useState } from 'react'; // 客户端收藏 API import { getAllFavorites } from '@/lib/db.client'; import CapsuleSwitch from '@/components/CapsuleSwitch'; -import CollectionCard from '@/components/CollectionCard'; import ContinueWatching from '@/components/ContinueWatching'; import DemoCard from '@/components/DemoCard'; import PageLayout from '@/components/PageLayout'; @@ -33,29 +23,6 @@ interface DoubanResponse { list: DoubanItem[]; } -// 合集数据 -const collections = [ - { - icon: Film, - title: '热门电影', - href: '/douban?type=movie&tag=热门&title=热门电影', - }, - { - icon: Tv, - title: '热门剧集', - href: '/douban?type=tv&tag=热门&title=热门剧集', - }, - { - icon: Star, - title: '豆瓣 Top250', - href: '/douban?type=movie&tag=top250&title=豆瓣 Top250', - }, - { icon: Swords, title: '美剧', href: '/douban?type=tv&tag=美剧' }, - { icon: MessageCircleHeart, title: '韩剧', href: '/douban?type=tv&tag=韩剧' }, - { icon: MountainSnow, title: '日剧', href: '/douban?type=tv&tag=日剧' }, - { icon: VenetianMask, title: '日漫', href: '/douban?type=tv&tag=日本动画' }, -]; - function HomeClient() { const [activeTab, setActiveTab] = useState('home'); const [hotMovies, setHotMovies] = useState([]); @@ -166,27 +133,6 @@ function HomeClient() { ) : ( // 首页视图 <> - {/* 推荐 */} -
-

- 推荐 -

- - {collections.map((collection) => ( -
- -
- ))} -
-
- {/* 继续观看 */} diff --git a/src/components/CollectionCard.tsx b/src/components/CollectionCard.tsx deleted file mode 100644 index 5313300..0000000 --- a/src/components/CollectionCard.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { LucideIcon } from 'lucide-react'; -import Link from 'next/link'; - -interface CollectionCardProps { - title: string; - icon: LucideIcon; - href: string; -} - -export default function CollectionCard({ - title, - icon: Icon, - href, -}: CollectionCardProps) { - return ( - -
- {/* 长方形容器 - 调整宽高比和背景色 */} -
- {/* 图标容器 */} -
- -
- - {/* Hover 蒙版效果 - 参考 DemoCard */} -
-
- - {/* 标题 - absolute 定位,类似 DemoCard */} -
-
-

- {title} -

-
-
-
- - ); -}