's'
This commit is contained in:
22
components/order-activation.tsx
Normal file
22
components/order-activation.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useAuth } from "@/components/auth-provider";
|
||||
|
||||
export function OrderActivation({ slug, canActivate }: { slug: string; canActivate: boolean }) {
|
||||
const { setAccessLevel } = useAuth();
|
||||
|
||||
if (!canActivate) {
|
||||
return <Link href={`/apps/${slug}`} className="cta-main">返回资源详情</Link>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={`/apps/${slug}`}
|
||||
onClick={() => setAccessLevel("vip")}
|
||||
className="cta-main"
|
||||
>
|
||||
激活 VIP 并返回资源详情
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user