'init'
This commit is contained in:
37
app/pay/paid/page.tsx
Normal file
37
app/pay/paid/page.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import { Header } from "@/app/components";
|
||||
|
||||
const PAY_STORAGE_KEY = "pay";
|
||||
|
||||
export default function PayPaidPage() {
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined") {
|
||||
localStorage.setItem(PAY_STORAGE_KEY, "ok");
|
||||
window.dispatchEvent(new CustomEvent("pay:updated"));
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-[var(--background)] text-[var(--foreground)]">
|
||||
<Header />
|
||||
<main className="flex min-h-[80vh] flex-col items-center justify-center px-4">
|
||||
<div className="mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-green-500/20 text-4xl">
|
||||
✓
|
||||
</div>
|
||||
<h1 className="mb-2 text-2xl font-bold">支付成功</h1>
|
||||
<p className="mb-8 text-[var(--muted-foreground)]">
|
||||
已解锁全部课程视频,开始学习吧
|
||||
</p>
|
||||
<Link
|
||||
href="/"
|
||||
className="rounded-full bg-[var(--accent)] px-8 py-3 font-medium text-[var(--accent-foreground)] transition hover:opacity-90"
|
||||
>
|
||||
返回课程首页
|
||||
</Link>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user