mirror of
https://github.com/AmanTahiliani/PeerNotes.git
synced 2026-08-07 11:55:12 -04:00
Merge branch 'api_call_search_sahej' of https://github.com/AmanTahiliani/PeerNotes into api_call_search_sahej
This commit is contained in:
@@ -31,6 +31,14 @@ export default function App() {
|
||||
)
|
||||
}
|
||||
function Navbar() {
|
||||
const linkStyle = {
|
||||
textDecoration: 'none',
|
||||
color: 'black',
|
||||
background: '#B1D4E0',
|
||||
padding: '8px 16px',
|
||||
borderRadius: '5px',
|
||||
margin: '0 5px'
|
||||
};
|
||||
const session = useContext(SessionContext);
|
||||
const logout = () => {
|
||||
destroySessionCookie();
|
||||
@@ -39,8 +47,10 @@ function Navbar() {
|
||||
|
||||
const links = session ? (
|
||||
<>
|
||||
<Link to="/">Home</Link>
|
||||
<a onClick={logout}>Logout</a>
|
||||
<img src="/PeerNotes.png" alt="PeerNotes Logo" style={{ height: '60px', marginRight: '10px' }} />
|
||||
<Link to="/" style={linkStyle}>Home</Link>
|
||||
<Link to="/search" style={linkStyle}>Search</Link>
|
||||
<a onClick={logout} style={linkStyle}>Logout</a>
|
||||
</>
|
||||
): (
|
||||
<Link to="/login">Login</Link>
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
border: 3px solid #f1f1f1;
|
||||
border-radius: 5px;
|
||||
color: black;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
background-color: #145DA0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.App {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user