import Link from 'next/link' import {cookies} from 'next/headers' import {Button} from '@/components/ui/button' import {AuthContext} from '@/lib/auth' export type UserCenterProps = {} export default async function UserCenter(props: UserCenterProps) { const store = await cookies() const info = store.get('auth_info')?.value const data = info ? JSON.parse(info) as AuthContext : undefined return (
{data == undefined ? <> 登录 注册 : ( ) }
) }