aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-11-03 16:59:20 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commite9f4a48efd06d539eaaebd75880d569d6d093d58 (patch)
treec30a0b1e514814d7445ba9cb693273faf545eeff /vnext/src/ui
parent27d7faaac7adc1f254f565faf1ed2ddf57f8c91a (diff)
Switch back to grid layout
Diffstat (limited to 'vnext/src/ui')
-rw-r--r--vnext/src/ui/Header.js63
1 files changed, 7 insertions, 56 deletions
diff --git a/vnext/src/ui/Header.js b/vnext/src/ui/Header.js
index db8959ea..4a665605 100644
--- a/vnext/src/ui/Header.js
+++ b/vnext/src/ui/Header.js
@@ -1,10 +1,9 @@
import { memo, useCallback } from 'react';
import { Link, useNavigate } from 'react-router-dom';
-import Icon from './Icon';
-import { UserLink } from './UserInfo';
import SearchBox from './SearchBox';
import { useVisitor } from './VisitorContext';
+import Avatar from './Avatar';
function Header() {
const [visitor] = useVisitor();
@@ -21,60 +20,12 @@ function Header() {
return (
<div id="header">
<div id="header_wrapper">
- {
- visitor.uid < 0 ?
- <>
- <div id="logo"><a href="/" /></div>
- <nav id="global">
- <a href="/">Loading...</a>
- </nav>
- </>
- : visitor.uid > 0 ?
- <UserLink user={visitor} />
- : <div id="logo">
- <Link to="/">Juick</Link>
- </div>
- }
- {
- visitor.uid >= 0 &&
- <>
- <div id="search" className="desktop">
- <SearchBox onSearch={searchAll} />
- </div>
- <nav id="global">
- {visitor.uid > 0 ?
- <Link to={{ pathname: '/' }}>
- <Icon name="ei-bell" size="s" /><span className="desktop">Discuss</span>
- {
- visitor.unreadCount &&
- <span className="badge">{visitor.unreadCount}</span>
- }
- </Link>
- :
- <Link to='/?media=1' rel="nofollow">
- <Icon name="ei-camera" size="s" />
- <span className="desktop">Photos</span>
- </Link>
- }
- <Link to={{ pathname: '/discover' }} rel="nofollow">
- <Icon name="ei-search" size="s" />
- <span className="desktop">Discover</span>
- </Link>
-
- {visitor.uid > 0 ?
- <Link to={{ pathname: '/post' }}>
- <Icon name="ei-pencil" size="s" />
- <span className="desktop">Post</span>
- </Link>
- :
- <Link to={{ pathname: '/login', state: { retpath: window.location.pathname } }}>
- <Icon name="ei-user" size="s" />
- <span className="desktop">Login</span>
- </Link>
- }
- </nav>
- </>
- }
+ <div id="logo">
+ <Link to="/">Juick</Link>
+ </div>
+ <div id="search" className="desktop">
+ <SearchBox onSearch={searchAll} />
+ </div>
</div>
</div>
);