Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure Init & Navbar #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Frontend/atrentalsapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import React from 'react';
import logo from './logo.svg';
import './App.css';

import Home from "./components/pages/Home";

function App () {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p> Book Renting App</p>
</header>
<Home/>
</div>
);
}
Expand Down
65 changes: 65 additions & 0 deletions Frontend/atrentalsapp/src/components/layout/Navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React, { useState } from 'react';
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
UncontrolledDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
NavbarText
} from 'reactstrap';

const Example = (props) => {
const [isOpen, setIsOpen] = useState(false);

const toggle = () => setIsOpen(!isOpen);

return (
<div>
<Navbar color="light" light expand="md">
<NavbarText>@Rentals</NavbarText>
<NavbarToggler onClick={toggle} />
<Collapse isOpen={isOpen} navbar>
<Nav className="mr-auto" navbar>
<NavItem>
<NavLink href="/">Rent</NavLink>
</NavItem>
<NavItem>
<NavLink href="https://github.com/">Lease/ Give</NavLink>
</NavItem>
<UncontrolledDropdown nav inNavbar>
<DropdownToggle nav caret>
Books
</DropdownToggle>
<DropdownMenu right>
<DropdownItem>
Latest
</DropdownItem>
<DropdownItem>
Trending
</DropdownItem>
<DropdownItem divider />
<DropdownItem>
Other Categories
</DropdownItem>
</DropdownMenu>
</UncontrolledDropdown>
<NavItem>
<NavLink href="/">How this Works</NavLink>
</NavItem>
<NavItem>
<NavLink href="/">Contact Us</NavLink>
</NavItem>
</Nav>
</Collapse>
</Navbar>
</div>
);
}

export default Navbar;
12 changes: 12 additions & 0 deletions Frontend/atrentalsapp/src/components/pages/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import "../../App.css";
import Navbar from "../layout/Navbar";

const Home = () => {
return (
<div>
<Navbar />
</div>
);
};
export default Home;
Empty file.