2020-01-13 16:20:19 +01:00
|
|
|
import Link from 'next/link';
|
2020-01-13 22:34:56 +01:00
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
|
import { faCog, faTasks, faComments, faCommentDots, faUserPlus, faUser } from '@fortawesome/free-solid-svg-icons';
|
2020-01-13 16:20:19 +01:00
|
|
|
|
2020-01-20 13:11:45 +01:00
|
|
|
const Header = props => {
|
|
|
|
const isLogged = props.isLogged === "logged";
|
|
|
|
|
2020-01-13 16:20:19 +01:00
|
|
|
return (
|
|
|
|
<header>
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
<div className="navbar-options">
|
|
|
|
<li>
|
|
|
|
<Link href="/">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><img src="/taskoala.png" /></a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
2020-01-20 11:51:46 +01:00
|
|
|
<Link href="/tasks">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><FontAwesomeIcon icon={faTasks} /> Zadania</a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link href="/">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><FontAwesomeIcon icon={faCommentDots} /> Pytania</a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link href="/">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><FontAwesomeIcon icon={faComments} /> Rozmowy</a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link href="/">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><FontAwesomeIcon icon={faCog} /> Ustawienia</a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
</div>
|
|
|
|
<div className="navbar-auth">
|
2020-01-20 13:11:45 +01:00
|
|
|
{isLogged ?
|
|
|
|
<li>
|
|
|
|
<Link href="/profile">
|
|
|
|
<a>User name</a>
|
|
|
|
</Link>
|
|
|
|
</li>:
|
2020-01-13 16:20:19 +01:00
|
|
|
<li>
|
2020-01-16 22:14:53 +01:00
|
|
|
<Link href="/login">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><FontAwesomeIcon icon={faUser} /> Zaloguj się</a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
2020-01-20 13:11:45 +01:00
|
|
|
}
|
|
|
|
<li className={isLogged ? "hidden" : ""}>
|
2020-01-16 22:14:53 +01:00
|
|
|
<Link href="/register">
|
2020-01-13 22:34:56 +01:00
|
|
|
<a><FontAwesomeIcon icon={faUserPlus} /> Zarejestruj się</a>
|
2020-01-13 16:20:19 +01:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
</div>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Header;
|