Add animation to personal account dropdown

A "fade-in" animation has been added to the personal account dropdown menu on the dashboard home page. The user data handling has also been modified to ensure the props.user data is used as fallback. The changes should provide a smoother user experience and improved data stability.
This commit is contained in:
giancarlo
2024-04-16 17:09:07 +08:00
parent 76520a35b6
commit 35291975a6

View File

@@ -16,8 +16,10 @@ export function ProfileAccountDropdownContainer(props: {
const signOut = useSignOut();
const user = useUser(props.user);
const userData = user.data ?? props.user ?? null;
return (
<div className={props.collapsed ? '' : 'w-full'}>
<div className={props.collapsed ? '' : 'w-full animate-in fade-in-90'}>
<PersonalAccountDropdown
paths={{
home: pathsConfig.app.home,
@@ -27,7 +29,7 @@ export function ProfileAccountDropdownContainer(props: {
}}
className={'w-full'}
showProfileName={!props.collapsed}
user={user.data ?? null}
user={userData}
signOutRequested={() => signOut.mutateAsync()}
/>
</div>