1 import { useAddresses, useUser, useUserSettings } from '../../hooks';
2 import type { Props } from './BugModal';
3 import BugModal from './BugModal';
5 const AuthenticatedBugModal = (props: Omit<Props, 'username' | 'email'>) => {
6 const [{ Name = '', Email }] = useUser();
7 const [userSettings] = useUserSettings();
8 const [addresses = []] = useAddresses();
9 const email = Email || addresses[0]?.Email || userSettings?.Email?.Value;
10 return <BugModal username={Name} email={email} {...props} />;
13 export default AuthenticatedBugModal;