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

16 lines
367 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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>
)
}