Files
web/src/app/admin/_server/profile.tsx

16 lines
367 B
TypeScript
Raw Normal View History

import {ReactNode} from 'react'
import {cookies} from 'next/headers'
export type ProfileProps = {}
export default async function Profile(props: ProfileProps) {
const store = await cookies()
const info = store.get('auth_info')?.value
const data = info ? JSON.parse(info) : undefined
return (
<div>
{data?.payload.name}
</div>
)
}