add health benefit form
fix super admin
This commit is contained in:
@@ -6,14 +6,9 @@ import Link from 'next/link';
|
||||
|
||||
import type { User } from '@supabase/supabase-js';
|
||||
|
||||
import {
|
||||
ChevronsUpDown,
|
||||
Home,
|
||||
LogOut,
|
||||
UserCircle,
|
||||
Shield,
|
||||
} from 'lucide-react';
|
||||
import { ChevronsUpDown, Home, LogOut, Shield, UserCircle } from 'lucide-react';
|
||||
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@kit/ui/avatar';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -26,11 +21,11 @@ import { SubMenuModeToggle } from '@kit/ui/mode-toggle';
|
||||
import { ProfileAvatar } from '@kit/ui/profile-avatar';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
import { cn } from '@kit/ui/utils';
|
||||
|
||||
import { usePersonalAccountData } from '../hooks/use-personal-account-data';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@kit/ui/avatar';
|
||||
|
||||
import { toTitleCase } from '~/lib/utils';
|
||||
|
||||
import { usePersonalAccountData } from '../hooks/use-personal-account-data';
|
||||
|
||||
const PERSONAL_ACCOUNT_SLUG = 'personal';
|
||||
|
||||
export function PersonalAccountDropdown({
|
||||
@@ -41,7 +36,7 @@ export function PersonalAccountDropdown({
|
||||
paths,
|
||||
features,
|
||||
account,
|
||||
accounts = []
|
||||
accounts = [],
|
||||
}: {
|
||||
user: User;
|
||||
|
||||
@@ -104,7 +99,8 @@ export function PersonalAccountDropdown({
|
||||
className ?? '',
|
||||
{
|
||||
['active:bg-secondary/50 items-center gap-4 rounded-md' +
|
||||
' hover:bg-secondary m-0 transition-colors border-1 rounded-md px-4 py-1 h-10']: showProfileName,
|
||||
' hover:bg-secondary m-0 h-10 rounded-md border-1 px-4 py-1 transition-colors']:
|
||||
showProfileName,
|
||||
},
|
||||
)}
|
||||
>
|
||||
@@ -127,7 +123,6 @@ export function PersonalAccountDropdown({
|
||||
>
|
||||
{toTitleCase(displayName)}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<ChevronsUpDown
|
||||
@@ -171,7 +166,7 @@ export function PersonalAccountDropdown({
|
||||
<DropdownMenuSeparator />
|
||||
|
||||
<If condition={accounts.length > 0}>
|
||||
<span className='px-2 text-muted-foreground text-xs'>
|
||||
<span className="text-muted-foreground px-2 text-xs">
|
||||
<Trans
|
||||
i18nKey={'teams:yourTeams'}
|
||||
values={{ teamsCount: accounts.length }}
|
||||
@@ -185,12 +180,15 @@ export function PersonalAccountDropdown({
|
||||
href={`/home/${account.value}`}
|
||||
>
|
||||
<div className={'flex items-center'}>
|
||||
<Avatar className={'rounded-xs h-5 w-5 ' + account.image}>
|
||||
<AvatarImage {...(account.image && { src: account.image })} />
|
||||
<Avatar className={'h-5 w-5 rounded-xs ' + account.image}>
|
||||
<AvatarImage
|
||||
{...(account.image && { src: account.image })}
|
||||
/>
|
||||
|
||||
<AvatarFallback
|
||||
className={cn('rounded-md', {
|
||||
['bg-background']: PERSONAL_ACCOUNT_SLUG === account.value,
|
||||
['bg-background']:
|
||||
PERSONAL_ACCOUNT_SLUG === account.value,
|
||||
['group-hover:bg-background']:
|
||||
PERSONAL_ACCOUNT_SLUG !== account.value,
|
||||
})}
|
||||
@@ -199,9 +197,7 @@ export function PersonalAccountDropdown({
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
|
||||
<span className={'pl-3'}>
|
||||
{account.label}
|
||||
</span>
|
||||
<span className={'pl-3'}>{account.label}</span>
|
||||
</div>
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
|
||||
Reference in New Issue
Block a user