升级依赖版本并修复构建问题
This commit is contained in:
@@ -4,7 +4,8 @@ import Navbar from './_client/navbar'
|
||||
import Layout from './_client/layout'
|
||||
import {getProfile} from '@/actions/auth'
|
||||
import {redirect} from 'next/navigation'
|
||||
import {PasswordSetupWrapper} from './_client/passwordSetupWrapper'
|
||||
import {ChangePasswordDialog} from '@/components/composites/dialogs/change-password-dialog'
|
||||
import {RealnameAuthDialog} from '@/components/composites/dialogs/realname-auth-dialog'
|
||||
|
||||
export type AdminLayoutProps = {
|
||||
children: ReactNode
|
||||
@@ -25,10 +26,15 @@ export default async function AdminLayout(props: AdminLayoutProps) {
|
||||
content={(
|
||||
<>
|
||||
{props.children}
|
||||
{/* 需要时显示密码设置和实名认证 */}
|
||||
{(!profile?.has_password && !profile?.id_token) && (
|
||||
<PasswordSetupWrapper profile={profile}/>
|
||||
)}
|
||||
<RealnameAuthDialog
|
||||
hasAuthenticated={!!profile.id_token}
|
||||
triggerClassName="hidden"
|
||||
defaultOpen={!profile.id_token}
|
||||
/>
|
||||
<ChangePasswordDialog
|
||||
triggerClassName="hidden"
|
||||
defaultOpen={profile.has_password}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user