This commit includes a series of UI improvements and import path adjustments across several files. Changes include using a different icon and adjusting the styling in mode-toggle.tsx, modifying class names in personal-account-dropdown.tsx, and updating the import paths in multiple files following the renaming of the 'personal-account-dropdown' to 'personal-account-dropdown-container'.
31 lines
919 B
TypeScript
31 lines
919 B
TypeScript
'use client';
|
|
|
|
import { PersonalAccountDropdown } from '@kit/accounts/personal-account-dropdown';
|
|
import { useSignOut } from '@kit/supabase/hooks/use-sign-out';
|
|
import { useUser } from '@kit/supabase/hooks/use-user';
|
|
|
|
import featuresFlagConfig from '~/config/feature-flags.config';
|
|
import pathsConfig from '~/config/paths.config';
|
|
|
|
export function ProfileAccountDropdownContainer(props: { collapsed: boolean }) {
|
|
const signOut = useSignOut();
|
|
const user = useUser();
|
|
|
|
return (
|
|
<div className={props.collapsed ? '' : 'w-full'}>
|
|
<PersonalAccountDropdown
|
|
paths={{
|
|
home: pathsConfig.app.home,
|
|
}}
|
|
features={{
|
|
enableThemeToggle: featuresFlagConfig.enableThemeToggle,
|
|
}}
|
|
className={'w-full'}
|
|
showProfileName={!props.collapsed}
|
|
user={user.data ?? null}
|
|
signOutRequested={() => signOut.mutateAsync()}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|