feat(knowledge): enhance knowledge base detail page with embedded views
This commit is contained in:
@@ -6,10 +6,12 @@ import ProfileForm from "./components/ProfileForm";
|
||||
import ChangePasswordDialog from "./components/ChangePasswordDialog";
|
||||
import { useProfileSetting } from "@/hooks/setting-hooks";
|
||||
import logger from "@/utils/logger";
|
||||
import { useUserData } from "@/hooks/useUserData";
|
||||
|
||||
function ProfileSetting() {
|
||||
const { t } = useTranslation();
|
||||
const { userInfo, updateUserInfo: updateUserInfoFunc, changeUserPassword: changeUserPasswordFunc } = useProfileSetting();
|
||||
const { refreshUserData } = useUserData();
|
||||
const [passwordDialogOpen, setPasswordDialogOpen] = useState(false);
|
||||
|
||||
logger.debug('userInfo', userInfo);
|
||||
@@ -25,7 +27,10 @@ function ProfileSetting() {
|
||||
return (
|
||||
<Box sx={{ maxWidth: 800, mx: 'auto', p: 3 }}>
|
||||
{/* 个人资料表单 */}
|
||||
<ProfileForm userInfo={userInfo} onSubmit={updateUserInfoFunc} />
|
||||
<ProfileForm userInfo={userInfo} onSubmit={async (data) => {
|
||||
await updateUserInfoFunc(data);
|
||||
await refreshUserData();
|
||||
}} />
|
||||
|
||||
{/* 分割线 */}
|
||||
<Divider sx={{ my: 4 }} />
|
||||
|
||||
Reference in New Issue
Block a user