import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import { motion } from 'framer-motion'; import { useStore } from '@nanostores/react'; import { classNames } from '~/utils/classNames'; import { profileStore } from '~/lib/stores/profile'; import type { TabType, Profile } from './types'; interface AvatarDropdownProps { onSelectTab: (tab: TabType) => void; } export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => { const profile = useStore(profileStore) as Profile; return ( {profile?.avatar ? ( {profile?.username ) : (
)}
{profile?.avatar ? ( {profile?.username ) : (
)}
{profile?.username || 'Guest User'}
{profile?.bio &&
{profile.bio}
}
onSelectTab('profile')} >
Edit Profile onSelectTab('settings')} >
Settings
window.open('https://github.com/stackblitz-labs/bolt.diy/issues/new?template=bug_report.yml', '_blank') } >
Report Bug window.open('https://stackblitz-labs.github.io/bolt.diy/', '_blank')} >
Help & Documentation ); };