MCPcopy Create free account
hub / github.com/apollographql/fullstack-tutorial / Header

Function Header

final/client/src/components/header.tsx:26–39  ·  view source on GitHub ↗
({ image, children = 'Space Explorer' })

Source from the content-addressed store, hash-verified

24}
25
26const 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
41export default Header;
42

Callers

nothing calls this directly

Calls 1

pickAvatarByEmailFunction · 0.70

Tested by

no test coverage detected