修复编译问题 & 将人机验证组件动态化
This commit is contained in:
@@ -11,7 +11,7 @@ import actionBill from '../_assets/action-bill.webp'
|
||||
import actionBuy from '../_assets/action-buy.webp'
|
||||
import actionLogout from '../_assets/action-logout.webp'
|
||||
|
||||
async function UserCenter() {
|
||||
export default async function UserCenter() {
|
||||
const resp = await getProfile()
|
||||
if (!resp.success) {
|
||||
return (
|
||||
@@ -90,4 +90,3 @@ async function UserCenter() {
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
export default UserCenter
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ReactNode} from 'react'
|
||||
import {ReactNode, Suspense} from 'react'
|
||||
import {Metadata} from 'next'
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
@@ -12,5 +12,5 @@ export type ProfileLayoutProps = {
|
||||
}
|
||||
|
||||
export default async function ProfileLayout(props: ProfileLayoutProps) {
|
||||
return props.children
|
||||
return <Suspense>{props.children}</Suspense>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user