-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from tan12082001/Pages
Pages
- Loading branch information
Showing
19 changed files
with
313 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import React from 'react'; | ||
import { Outlet } from 'react-router-dom'; | ||
|
||
import Footer from './footer/Footer'; | ||
import Header from './header/Header'; | ||
// import Footer from './footer/Footer'; | ||
import Header from './header/Header'; | ||
|
||
const LandingPageLayout = () => ( | ||
<> | ||
<Header /> | ||
<main> | ||
<Outlet /> | ||
</main> | ||
<Footer /> | ||
</> | ||
); | ||
const LandingPageLayout = () => { | ||
// eslint-disable-next-line arrow-body-style | ||
return ( | ||
<> | ||
<Header /> | ||
<main> | ||
<Outlet /> | ||
</main> | ||
{/* <Footer /> */} | ||
</> | ||
); | ||
}; | ||
|
||
export default LandingPageLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import { Outlet, useLocation } from 'react-router-dom'; | ||
|
||
import styled from '@emotion/styled'; | ||
|
||
import Nav from './sideNav/Nav'; | ||
|
||
const UsersDashboardLayout = () => { | ||
const location = useLocation(); | ||
const { pathname } = location; | ||
const splitLocation = pathname.split('/'); | ||
|
||
return ( | ||
<Container> | ||
<Nav /> | ||
<Section> | ||
<MainContent> | ||
<Outlet /> | ||
</MainContent> | ||
</Section> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default UsersDashboardLayout; | ||
|
||
const Container = styled.div` | ||
display: grid; | ||
grid-template-columns: 18rem auto; | ||
height: 100vh; | ||
width: 100vw; | ||
/* border: 2px solid red; */ | ||
overflow: scroll; | ||
background-color: #FFD700; | ||
`; | ||
|
||
const Section = styled.section` | ||
/* border: 2px solid yellow; */ | ||
width: 100%; | ||
`; | ||
|
||
const MainContent = styled.main` | ||
/* border: 2px solid red; */ | ||
margin: 2rem 6.25rem 5.69rem 3.38rem; | ||
height: fit-content; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from "react"; | ||
|
||
import styled from "@emotion/styled"; | ||
|
||
import navConfig from "./navConfig"; | ||
import { NavBoxItem } from "../../../components/Link/Link"; | ||
|
||
const Nav = () => { | ||
return ( | ||
<Container> | ||
<NavbtnSection> | ||
{navConfig.map((nav) => ( | ||
<NavBoxItem path={nav.path} key={nav.title}> | ||
{nav.title} | ||
</NavBoxItem> | ||
))} | ||
</NavbtnSection> | ||
<LogoutBtn> | ||
<NavBoxItem path={'/account/signin'}> | ||
Logout | ||
</NavBoxItem> | ||
</LogoutBtn> | ||
</Container> | ||
) | ||
} | ||
|
||
export default Nav; | ||
|
||
const Container = styled.nav` | ||
/* border: 2px solid blue; */ | ||
padding: 2.69rem 2rem 3.75rem 2rem; | ||
display: flex; | ||
background-color: white; | ||
flex-direction: column; | ||
gap: 3.8rem; | ||
// position: fixed; | ||
top: 0; | ||
& > a > div { | ||
margin-left: 1rem; | ||
} | ||
`; | ||
|
||
const NavbtnSection = styled.section` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
`; | ||
|
||
const LogoutBtn = styled.div` | ||
margin-top: auto; | ||
`; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
RESERVED_CARS, | ||
MY_RESERVATIONS, | ||
USERDASHBOARDHOME, | ||
ADD_NEW_CAR, | ||
DELETE_RESERVATION, | ||
CONTACT | ||
} from '../../../routes/routeConstants'; | ||
|
||
const navConfig = [ | ||
{ | ||
title: 'Dashboard', | ||
path: USERDASHBOARDHOME, | ||
// icon: FourCubes(), | ||
}, | ||
|
||
{ | ||
title: 'My Reservations', | ||
path: MY_RESERVATIONS, | ||
// icon: JobsIcon(), | ||
}, | ||
|
||
{ | ||
title: 'Reserved Cars', | ||
path: RESERVED_CARS, | ||
// icon: PlaneIcon(), | ||
}, | ||
|
||
{ | ||
title: 'Add New Cars', | ||
path: ADD_NEW_CAR, | ||
// icon: PlaneIcon(), | ||
}, | ||
|
||
{ | ||
title: 'Delete Reservation', | ||
path: DELETE_RESERVATION, | ||
// icon: PlaneIcon(), | ||
}, | ||
|
||
{ | ||
title: 'Contact', | ||
path: CONTACT, | ||
// icon: PlaneIcon(), | ||
}, | ||
]; | ||
|
||
export default navConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const AddNewCar = () => <p>Add New Car</p>; | ||
|
||
export default AddNewCar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const Contact = () => <p>Contact</p>; | ||
|
||
export default Contact; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const DeleteReservation = () => <p>Delete Reservation</p>; | ||
|
||
export default DeleteReservation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,48 @@ | ||
import React from 'react'; | ||
import styled from '@emotion/styled'; | ||
import Img from '../../../components/Img/Img'; | ||
import AuthNav from '../../../layout/LandingPage/nav/AuthNav'; | ||
|
||
const Home = () => <p> Home Page </p>; | ||
const Home = () => ( | ||
<Container> | ||
<BigText> | ||
<Image> | ||
<Img src="/static/img/bicycle.jpg" alt='Bicycle'/> | ||
</Image> | ||
<Paragraph>THE NEW VESPA TRIDENT</Paragraph> | ||
<Auth> | ||
<AuthNav /> | ||
</Auth> | ||
</BigText> | ||
</Container> | ||
) | ||
|
||
export default Home; | ||
|
||
const Container = styled.div` | ||
background-color: #FFD700; | ||
border: 1px solid #FFD700; | ||
`; | ||
|
||
const BigText = styled.div` | ||
margin-left: 30rem; | ||
margin-top: 20rem; | ||
margin-bottom: 3rem; | ||
`; | ||
|
||
const Paragraph = styled.p` | ||
font-size: 3rem; | ||
margin-top: -3rem; | ||
`; | ||
|
||
const Image = styled.div` | ||
width: 50%; | ||
`; | ||
|
||
const Auth = styled.div` | ||
margin-top: 1rem; | ||
margin-left: -29rem; | ||
margin-bottom: 7.2rem; | ||
border: 1px solid #FFD700; | ||
padding-left: -20rem; | ||
`; |
Oops, something went wrong.