diff --git a/src/app/daily/layout.tsx b/src/app/daily/layout.tsx new file mode 100644 index 0000000..3b2bb02 --- /dev/null +++ b/src/app/daily/layout.tsx @@ -0,0 +1,10 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "追光AI日报 - AI行业前沿资讯", + description: "每日精选AI行业新闻,涵盖模型前沿、产品落地、开源生态、商业产业、政策治理等板块。", +}; + +export default function DailyLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/src/app/daily/page.tsx b/src/app/daily/page.tsx index 09838da..ffec915 100644 --- a/src/app/daily/page.tsx +++ b/src/app/daily/page.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Metadata } from "next"; import { useState, useEffect, useMemo } from "react"; import Link from "next/link"; import { HeroBanner } from "@/components/common/HeroBanner"; @@ -47,11 +46,6 @@ const CATEGORIES: Record([]); const [loading, setLoading] = useState(true); diff --git a/src/app/login/layout.tsx b/src/app/login/layout.tsx new file mode 100644 index 0000000..6d25cd6 --- /dev/null +++ b/src/app/login/layout.tsx @@ -0,0 +1,10 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "登录 - 追光AI", + description: "登录追光AI,管理你的AI工具收藏与技能评测。", +}; + +export default function LoginLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index a00569e..6844400 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,15 +1,9 @@ "use client"; -import type { Metadata } from "next"; import { signIn } from "next-auth/react"; import { useRouter } from "next/navigation"; import { LoginForm } from "@/components/common/LoginForm"; -export const metadata: Metadata = { - title: "登录 - 追光AI", - description: "登录追光AI,管理你的AI工具收藏与技能评测。", -}; - export default function LoginPage() { const router = useRouter(); diff --git a/src/app/reviews/layout.tsx b/src/app/reviews/layout.tsx new file mode 100644 index 0000000..36a43fd --- /dev/null +++ b/src/app/reviews/layout.tsx @@ -0,0 +1,10 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "追光评测 - AI技能深度评测", + description: "五维AI技能评测体系,客观评价开源AI项目的功能性、易用性、文档质量、性能和社区活跃度。", +}; + +export default function ReviewsLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/src/app/reviews/page.tsx b/src/app/reviews/page.tsx index 12176af..6894ce9 100644 --- a/src/app/reviews/page.tsx +++ b/src/app/reviews/page.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Metadata } from "next"; import { useState, useEffect } from "react"; import { HeroBanner } from "@/components/common/HeroBanner"; import { ReviewsList } from "./ReviewsList"; @@ -22,11 +21,6 @@ interface RankingsData { totalReviews: number; } -export const metadata: Metadata = { - title: "追光评测 - AI技能深度评测", - description: "五维AI技能评测体系,客观评价开源AI项目的功能性、易用性、文档质量、性能和社区活跃度。", -}; - export default function ReviewsPage() { const [rankings, setRankings] = useState(null); const [totalReviews, setTotalReviews] = useState(0); diff --git a/src/app/user/collections/layout.tsx b/src/app/user/collections/layout.tsx new file mode 100644 index 0000000..1971b08 --- /dev/null +++ b/src/app/user/collections/layout.tsx @@ -0,0 +1,9 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "我的收藏夹 - 追光AI", +}; + +export default function CollectionsLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/src/app/user/collections/page.tsx b/src/app/user/collections/page.tsx index 9fc9ed3..4ddf948 100644 --- a/src/app/user/collections/page.tsx +++ b/src/app/user/collections/page.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Metadata } from "next"; import { useState, useEffect } from "react"; import { useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; @@ -15,10 +14,6 @@ interface Collection { _count: { items: number }; } -export const metadata: Metadata = { - title: "我的收藏夹 - 追光AI", -}; - export default function CollectionsPage() { const { data: session, status } = useSession(); const router = useRouter(); diff --git a/src/app/user/favorites/layout.tsx b/src/app/user/favorites/layout.tsx new file mode 100644 index 0000000..614584f --- /dev/null +++ b/src/app/user/favorites/layout.tsx @@ -0,0 +1,9 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "我的收藏 - 追光AI", +}; + +export default function FavoritesLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/src/app/user/favorites/page.tsx b/src/app/user/favorites/page.tsx index 1e45cbf..33b6e14 100644 --- a/src/app/user/favorites/page.tsx +++ b/src/app/user/favorites/page.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Metadata } from "next"; import { useState, useEffect } from "react"; import { useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; @@ -51,10 +50,6 @@ const sourceTypeColor: Record = { type FilterType = "all" | "tool" | "skill"; -export const metadata: Metadata = { - title: "我的收藏 - 追光AI", -}; - export default function FavoritesPage() { const { data: session, status } = useSession(); const router = useRouter(); diff --git a/src/app/user/layout.tsx b/src/app/user/layout.tsx new file mode 100644 index 0000000..b307549 --- /dev/null +++ b/src/app/user/layout.tsx @@ -0,0 +1,10 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "个人中心 - 追光AI", + description: "管理你的追光AI个人资料、收藏与成就。", +}; + +export default function UserLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/src/app/user/page.tsx b/src/app/user/page.tsx index 8478060..631ebb3 100644 --- a/src/app/user/page.tsx +++ b/src/app/user/page.tsx @@ -1,6 +1,5 @@ "use client"; -import type { Metadata } from "next"; import { useState, useEffect } from "react"; import { useSession, signOut } from "next-auth/react"; import { useRouter } from "next/navigation"; @@ -47,11 +46,6 @@ function getTimeAgo(date: Date | string): string { return d.toLocaleDateString("zh-CN"); } -export const metadata: Metadata = { - title: "个人中心 - 追光AI", - description: "管理你的追光AI个人资料、收藏与成就。", -}; - export default function UserProfilePage() { const { data: session, status } = useSession(); const router = useRouter();