's'
This commit is contained in:
35
app/vip/components/VipHeader.tsx
Normal file
35
app/vip/components/VipHeader.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { ThemeToggle } from "@/app/components/ThemeToggle";
|
||||
import styles from "./vip.module.css";
|
||||
|
||||
type VipHeaderProps = {
|
||||
isLoggedIn: boolean;
|
||||
userName?: string | null;
|
||||
};
|
||||
|
||||
export function VipHeader({ isLoggedIn, userName }: VipHeaderProps) {
|
||||
return (
|
||||
<header className={styles.header}>
|
||||
<Link
|
||||
href="https://digital.hackrobot.cn/zh"
|
||||
className={styles.logo}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
🌍 异度星球
|
||||
</Link>
|
||||
<nav className={styles.nav}>
|
||||
<ThemeToggle />
|
||||
{isLoggedIn ? (
|
||||
<span className={styles.userBadge}>{userName || "会员"}</span>
|
||||
) : (
|
||||
<Link href="/#login" className={styles.loginLink}>
|
||||
登录
|
||||
</Link>
|
||||
)}
|
||||
</nav>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user