-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d85d577
commit e9571a1
Showing
13 changed files
with
118 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import TheNavbar from "../components/TheNavbar"; | ||
import TheFooter from "../components/TheFooter" | ||
import { Outlet } from "react-router-dom"; | ||
|
||
const GuestLayout = () => { | ||
return ( | ||
<> | ||
|
||
<TheNavbar/> | ||
|
||
<Outlet /> | ||
<div> | ||
<TheFooter /> | ||
</div> | ||
</> | ||
|
||
); | ||
} | ||
|
||
export default GuestLayout |
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,33 +1,42 @@ | ||
import React from "react"; | ||
import { createRoot } from "react-dom/client"; | ||
import "./index.css"; | ||
import "../src/assets/css/index.css"; | ||
import GuestLayout from "./layouts/guest"; | ||
import { RouterProvider, createBrowserRouter } from "react-router-dom"; | ||
import HomePage from "./pages/HomePage"; | ||
import AboutPage from "./pages/AboutPage"; | ||
import DestinationPage from "./pages/DestinationPage"; | ||
import ContactPage from "./pages/ContactPage"; | ||
import App from "./App" | ||
import { Route, createBrowserRouter } from "react-router-dom"; | ||
import ErrorPage from "./pages/ErrorPage"; | ||
|
||
const routers = createBrowserRouter([ | ||
Route({ | ||
const router = createBrowserRouter([ | ||
{ | ||
path: '/', | ||
element: <HomePage />, | ||
}), | ||
Route({ | ||
path: '/', | ||
element: <AboutPage />, | ||
}), | ||
Route({ | ||
path: '/', | ||
element: <DestinationPage />, | ||
}), | ||
Route({ | ||
path: '/', | ||
element: <ContactPage/>, | ||
}), | ||
element: <GuestLayout />, | ||
children: [ | ||
{ | ||
path: '/', | ||
element:<HomePage/>, | ||
}, | ||
{ | ||
path: '/about', | ||
element: <AboutPage />, | ||
}, | ||
{ | ||
path: '/destination', | ||
element: <DestinationPage />, | ||
}, | ||
{ | ||
path: '/contact', | ||
element: <ContactPage/>, | ||
}, | ||
], | ||
errorElement:<ErrorPage/> | ||
}, | ||
|
||
]); | ||
|
||
|
||
const rootId = document.getElementById("root"); | ||
const root = createRoot(rootId); | ||
root.render(<App/>); | ||
root.render(<RouterProvider router = {router}/>); |
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,5 @@ | ||
const ContactPage = () => { | ||
return <h1 className="font-bold">Booking</h1> | ||
return <h1 className="font-bold">Contact</h1> | ||
} | ||
|
||
export default ContactPage |
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,8 @@ | ||
|
||
const DestinationPage = () => { | ||
return <h1 className="font-bold">Destination</h1> | ||
return <div> | ||
<h4>Your Destination is here</h4> | ||
</div> | ||
} | ||
|
||
export default DestinationPage |
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,21 @@ | ||
import { Link, useRouteError } from "react-router-dom"; | ||
|
||
const ErrorPage = () => { | ||
const {data, status, statusText} = useRouteError(); | ||
return ( | ||
<div> | ||
<div className="bg-[#393E46] max-w-2xl mx-auto rounded font-cabin tracking-wider mt-10 p-10"> | ||
<div className="flex items-center space-x-4 text-white italics"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 16 16" className="fill-red-600"><path fill-rule="evenodd" d="M8 14.5a6.5 6.5 0 1 0 0-13a6.5 6.5 0 0 0 0 13M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m1-5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25-6.25a.75.75 0 0 0-1.5 0v3.5a.75.75 0 0 0 1.5 0z" clip-rule="evenodd" /></svg> | ||
<span className="text-4xl">{status} {statusText}</span> | ||
</div> | ||
<div className="text-white text-lg font-cabin font-bold p-8"> | ||
<p>{data}</p> | ||
</div> | ||
<Link to='/' className="underline underline-offset-4 font-cabin tracking-wider text-lg text-[#FFD369] hover:cursor-pointer hover:text-white">Go Home</Link> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ErrorPage |
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,4 +1,24 @@ | ||
const HomePage = () => { | ||
return <h1 className="font-bold">Home</h1> | ||
return <div> | ||
<div> | ||
<div> | ||
<img src="../src/assets/image/wander-background.jpg" alt="wander image" className="h-60 w-full object-cover"></img> | ||
</div> | ||
<div className="m-4 p-2 text-center font-cabin tracking-wider"> | ||
<h5 className="font-bold text-4xl">Why <span className="text-[#FFD369]">Wander ?</span></h5> | ||
<p className="first-letter:text-3xl text-xl p-2">Wandering, walking, trekking - helps to make better conclusion, give new ideas and insightfulness. Making your body and mind feel fresh and healthy. Prevent from Heart Disease. Strengthen relationships </p> | ||
</div> | ||
<div className="m-4"> | ||
<h5 className="font-bold font-cabin tracking-wider text-4xl text-center">Why <span className="text-[#ffd369]">WanderLust ?</span></h5> | ||
<div className="flex justify-center items-center space-x-4"> | ||
<div><img src="../src/assets/image/trekking.png" alt="trekking" className="w-80 h-32 object-contain"></img></div> | ||
<div> | ||
<p className="font-cabin tracking-wider text-xl text-left">WanderLust gives the exploring options of your choice. Description of each and every place with map locations attached. | ||
WanderLust guided you with expertise in all fields of travelling</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
export default HomePage |