diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-07-03 21:16:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 21:16:24 +0300 |
commit | af51f6c8a6fabdd8e578e13599b33f121f483a52 (patch) | |
tree | 1104abe0fa751b858177324b408f9bdf830ed15a /src/components/Header/Header.tsx | |
parent | cb521315c2291eda6b273b5f8a2e014c24ea9758 (diff) | |
parent | 14926e00ec1d749d5e2c83bdcd98ed68e9b2f896 (diff) | |
download | which-ui-af51f6c8a6fabdd8e578e13599b33f121f483a52.tar.gz |
Merge pull request #59 from which-ecosystem/pages
Markup landing page and blank notifications page
Diffstat (limited to 'src/components/Header/Header.tsx')
-rw-r--r-- | src/components/Header/Header.tsx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 72e40f8..294c250 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -22,7 +22,8 @@ const useStyles = makeStyles({ margin: 'auto' }, logo: { - fontWeight: 'bold' + fontWeight: 'bold', + cursor: 'pointer' }, avatar: { width: 24, @@ -36,6 +37,10 @@ const Header: React.FC = () => { const { navigate } = useNavigate(); const handleHome = (): void => { + navigate('home'); + }; + + const handleFeed = (): void => { navigate('feed'); }; @@ -44,17 +49,19 @@ const Header: React.FC = () => { else navigate('auth'); }; - const handleNotifications = (): void => {}; + const handleNotifications = (): void => { + navigate('notifications'); + }; return ( <AppBar position="fixed"> <Toolbar className={classes.root}> - <Typography variant="h5" className={classes.logo}> + <Typography variant="h5" className={classes.logo} onClick={handleHome}> Which </Typography> <SearchBar /> <div> - <IconButton onClick={handleHome}> + <IconButton onClick={handleFeed}> <HomeIcon /> </IconButton> <IconButton onClick={handleNotifications}> @@ -62,7 +69,7 @@ const Header: React.FC = () => { </IconButton> <IconButton onClick={handleProfile}> { - user?.avatarUrl?.match(/\.(jpeg|jpg|gif|png)$/) + user?.avatarUrl ? <Avatar className={classes.avatar} src={user?.avatarUrl} /> : <AccountCircle /> } |