压缩历史至 95081aff

This commit is contained in:
ryan
2026-06-08 20:34:27 +08:00
commit 8a782525de
435 changed files with 71146 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
/**
* 红包页面布局
* 提供简洁的布局,不包含侧边栏和用户上下文
* 允许未登录用户访问红包详情
*/
export default function RedEnvelopeLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<div className="min-h-screen w-full">
{children}
</div>
)
}
@@ -0,0 +1,32 @@
import type { Metadata } from "next"
import { headers } from "next/headers"
import { RedEnvelopeClaimPage } from "@/components/common/redenvelope/red-envelope-claim"
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
const { id } = await params
const requestHeaders = await headers()
const protocol = requestHeaders.get("x-forwarded-proto") ?? "https"
const host = requestHeaders.get("x-forwarded-host") ?? requestHeaders.get("host") ?? ""
const baseUrl = host ? `${protocol}://${host}` : ""
const title = "你收到一个LDC红包"
const description = "点击打开领取"
const url = baseUrl ? `${baseUrl}/redenvelope/${id}` : undefined
const image = baseUrl ? `${baseUrl}/red-envelope.svg` : "/red-envelope.svg"
return {
title,
description,
openGraph: {
title,
description,
url,
type: "website",
images: [{ url: image, width: 384, height: 512, alt: "红包" }],
}
}
}
export default async function RedEnvelopePage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params
return <RedEnvelopeClaimPage id={id} />
}