feat(UserCenter): add background change functionality
This commit introduces a new `ChangeBackground` component into the User Center page. The component is now rendered before the main content to dynamically update the background based on the user's picture URL. - Added import for `ChangeBackground` component. - Integrated `ChangeBackground` with the user's picture URL (falling back to empty string if unavailable). - No breaking changes or migration required.
This commit is contained in:
parent
845a50253b
commit
3be476ad13
@ -8,6 +8,7 @@ import useAutoLogin from "../hooks/useAutoLogin";
|
|||||||
import { LOGTO_DOMAIN } from "../utils/common";
|
import { LOGTO_DOMAIN } from "../utils/common";
|
||||||
import { useAppVersion } from "../hooks/useAppVersion";
|
import { useAppVersion } from "../hooks/useAppVersion";
|
||||||
import { BindKaiqiuAccount } from "../components/BindKaiqiuAccount";
|
import { BindKaiqiuAccount } from "../components/BindKaiqiuAccount";
|
||||||
|
import { ChangeBackground } from "../components/ChangeBackground";
|
||||||
|
|
||||||
enum modifyRoutes {
|
enum modifyRoutes {
|
||||||
username = '/account/username',
|
username = '/account/username',
|
||||||
@ -77,6 +78,7 @@ export const UserCenter = () => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<ChangeBackground url={user?.picture ?? ''} />
|
||||||
<Flex className="app" gap={12} vertical align="center" style={{ maxWidth: 600 }}>
|
<Flex className="app" gap={12} vertical align="center" style={{ maxWidth: 600 }}>
|
||||||
<Avatar size={128} src={user?.picture ?? user?.name} />
|
<Avatar size={128} src={user?.picture ?? user?.name} />
|
||||||
<Flex>
|
<Flex>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user