Skip to content

Commit

Permalink
Merge pull request #74 from GSG-G10/40-navbar
Browse files Browse the repository at this point in the history
create navbar component with style #40
  • Loading branch information
Mu7ammadAbed authored Nov 7, 2021
2 parents f31301e + d2085b8 commit 1d3c26a
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { BrowserRouter as Router } from 'react-router-dom';
import NavBar from './components/Navbar';
import { Footer } from './components';

function App() {
return (
<div className="App">

<Router>
<NavBar />

</Router>
<Footer />
</div>

Expand Down
Binary file added client/src/asstes/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/asstes/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions client/src/components/Navbar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* eslint-disable no-unused-vars */
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import {
ListItem, ListItemText, Button, Avatar, Container, List,
} from '@mui/material';
import './style.css';

import Logo from '../../asstes/logo.png';
import PresonImg from '../../asstes/avatar.png';

function NavBar() {
const [logged, setLogged] = useState(true);
return (
<Container maxWidth="xl">
<nav className="container">
<Link to="/">
<img src={Logo} alt="logo-housy" className="img-logo" />
</Link>
{' '}
<List
className="list"
sx={{ justifyContent: 'space-between' }}
style={{
marginRight: '150px', alignSelf: 'center', color: '#797B7D',
}}
>
<Link to="/" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button style={{ textDecoration: 'none' }}>
<ListItemText primary="Home" />
</ListItem>
</Link>

<Link to="/signup" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button>
<ListItemText primary="About" />
</ListItem>
</Link>
<Link to="/" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button>
<ListItemText primary="Buy" />
</ListItem>
</Link>
<Link to="/" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button>
<ListItemText primary="Rent" />
</ListItem>
</Link>
</List>

<div className="agent">
<Button style={{
marginRight: '30px', alignSelf: 'center', backgroundColor: '#3781CB', color: '#FFFFFF', textTransform: 'none',
}}
>
{' '}
<Link to="/login" className="btn-host">
<ListItemText primary="Host my House" style={{ color: '#fff' }} />
</Link>
</Button>
{logged ? (
<Link to="/">
<Avatar src={PresonImg} />
</Link>
) : (
''
)}
</div>

</nav>
</Container>

);
}
export default NavBar;
18 changes: 18 additions & 0 deletions client/src/components/Navbar/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.container {
display: flex;
flex-direction: row;
justify-content: space-around;
}
.img-logo {
width: 90px;
height: 80px;
}
.list {
display: flex;
align-self: center;
}
.agent {
display: flex;
flex-direction: row;
align-self: center;
}

0 comments on commit 1d3c26a

Please sign in to comment.