diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts index be80e8457..87acda5e4 100644 --- a/apps/web/tailwind.config.ts +++ b/apps/web/tailwind.config.ts @@ -5,6 +5,6 @@ import baseConfig from '@kit/tailwind-config'; export default { // We need to append the path to the UI package to the content array so that // those classes are included correctly. - content: [...baseConfig.content, '../../packages/ui/src/**/*.{ts,tsx}'], + content: [...baseConfig.content], presets: [baseConfig], } satisfies Config; diff --git a/packages/features/accounts/src/components/account-selector.tsx b/packages/features/accounts/src/components/account-selector.tsx index 8cf9c9685..2947f15fc 100644 --- a/packages/features/accounts/src/components/account-selector.tsx +++ b/packages/features/accounts/src/components/account-selector.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; import { CaretSortIcon, PersonIcon } from '@radix-ui/react-icons'; -import { Check, Plus } from 'lucide-react'; +import { CheckCircle, Plus } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { Avatar, AvatarFallback, AvatarImage } from '@kit/ui/avatar'; @@ -22,6 +22,7 @@ import { Trans } from '@kit/ui/trans'; import { cn } from '@kit/ui/utils'; import { CreateTeamAccountDialog } from '../../../team-accounts/src/components/create-team-account-dialog'; +import { usePersonalAccountData } from '../hooks/use-personal-account-data'; interface AccountSelectorProps { accounts: Array<{ @@ -61,6 +62,7 @@ export function AccountSelector({ ); const { t } = useTranslation('teams'); + const personalData = usePersonalAccountData(); useEffect(() => { setValue(selectedAccount ?? PERSONAL_ACCOUNT_SLUG); @@ -68,7 +70,7 @@ export function AccountSelector({ const Icon = (props: { item: string }) => { return ( - account.value === value); - if (!features.enableTeamAccounts) { return null; } + const selected = accounts.find((account) => account.value === value); + const pictureUrl = personalData.data?.picture_url; + + const PersonalAccountAvatar = () => + pictureUrl ? ( + + ) : ( + + ); + return ( <> @@ -101,7 +111,7 @@ export function AccountSelector({ condition={selected} fallback={ - + onAccountChange(undefined)} value={PERSONAL_ACCOUNT_SLUG} > - + - + @@ -200,13 +210,13 @@ export function AccountSelector({