({ image, children = 'Space Explorer' })
| 24 | } |
| 25 | |
| 26 | const Header: React.FC<HeaderProps> = ({ image, children = 'Space Explorer' }) => { |
| 27 | const email = window.atob(localStorage.getItem('token') as string); |
| 28 | const avatar = image || pickAvatarByEmail(email); |
| 29 | |
| 30 | return ( |
| 31 | <Container> |
| 32 | <Image round={!image} src={avatar} alt="Space dog" /> |
| 33 | <div> |
| 34 | <h2>{children}</h2> |
| 35 | <Subheading>{email}</Subheading> |
| 36 | </div> |
| 37 | </Container> |
| 38 | ); |
| 39 | }; |
| 40 | |
| 41 | export default Header; |
| 42 |
nothing calls this directly
no test coverage detected