16 lines
367 B
TypeScript
16 lines
367 B
TypeScript
|
|
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>
|
|||
|
|
)
|
|||
|
|
}
|