From 1228b3308411f7be18b3340f4c461eb425d2c5bc Mon Sep 17 00:00:00 2001
From: Kerolos Fayez <57182650+kero1019@users.noreply.github.com>
Date: Sun, 7 Jul 2024 21:54:36 +0300
Subject: [PATCH] adding files and updatin path
---
src/App.jsx | 30 +++++++++++++--------
src/Components/Header.jsx | 2 +-
src/Components/Host/Dashboard.jsx | 43 +++++++++++++++++++++++++++---
src/Components/Host/Host.jsx | 31 +--------------------
src/Components/Host/HostHeader.jsx | 18 +++++++++----
src/Components/Host/HostLayout.jsx | 15 +++++++++++
src/Components/VanDetails.jsx | 2 --
7 files changed, 88 insertions(+), 53 deletions(-)
create mode 100644 src/Components/Host/HostLayout.jsx
diff --git a/src/App.jsx b/src/App.jsx
index 4bdfb27..847f546 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1,5 +1,5 @@
import React from "react";
-import { BrowserRouter, Routes, Route, Link } from "react-router-dom";
+import { BrowserRouter, Routes, Route } from "react-router-dom";
import Home from "./Components/Home";
import About from "./Components/About";
import Vans from "./Components/Vans";
@@ -10,21 +10,29 @@ import Dashboard from "./Components/Host/Dashboard";
import "./Server";
import Income from "./Components/Host/Income";
import HostVans from "./Components/Host/HostVans";
-
+import HostLayout from "./Components/Host/HostLayout";
+import Reviews from "./Components/Host/Reviews";
function App() {
return (
- }>
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
+ }>
+ } />
+ } />
+ } />
+ } />
+ }
+ />
+
+
+ }>
+ } />
+ } />
+ } />
+ } />
diff --git a/src/Components/Header.jsx b/src/Components/Header.jsx
index 8df4e42..0d34935 100644
--- a/src/Components/Header.jsx
+++ b/src/Components/Header.jsx
@@ -7,7 +7,7 @@ export default function Header() {
#VANLIFE
diff --git a/src/Components/Host/Dashboard.jsx b/src/Components/Host/Dashboard.jsx
index c2818cd..d17d08a 100644
--- a/src/Components/Host/Dashboard.jsx
+++ b/src/Components/Host/Dashboard.jsx
@@ -1,9 +1,44 @@
-import React from 'react'
-
+import React from "react";
+import { FaStar } from "react-icons/fa";
+import HostYourListVans from "./HostYourListVans";
export default function Dashboard() {
return (
-
welcome in dashboard
+
+
+
+
Welcome !
+
+ income last{" "}
+
+ 30 days
+
+
+
$2,260
+
+
Details
+
+
+
+
Review Score
+
+
+ 5.0/5
+
+
+
+
+
Your listed vans
+
+ View all
+
+
+
+
+
+
+
+
- )
+ );
}
diff --git a/src/Components/Host/Host.jsx b/src/Components/Host/Host.jsx
index f221a3c..4c890f3 100644
--- a/src/Components/Host/Host.jsx
+++ b/src/Components/Host/Host.jsx
@@ -1,39 +1,10 @@
import React from "react";
import HostHeader from "./HostHeader";
-import { FaStar } from "react-icons/fa";
-import HostYourListVans from "./HostYourListVans";
+
export default function Host() {
return (
-
-
-
-
Welcome !
-
- income last 30 days
-
-
$2,260
-
-
Details
-
-
-
-
Review Score
-
-
5.0/5
-
-
-
-
Your listed vans
-
View all
-
-
-
-
-
-
-
);
}
diff --git a/src/Components/Host/HostHeader.jsx b/src/Components/Host/HostHeader.jsx
index 6e77d3a..95d7fab 100644
--- a/src/Components/Host/HostHeader.jsx
+++ b/src/Components/Host/HostHeader.jsx
@@ -1,13 +1,21 @@
import React from "react";
import HeaderButton from "../HeaderButton";
-
+import { Link } from "react-router-dom";
export default function HostHeader() {
return (
- Dashboard
- Income
- Vans
- Reviews
+
+ Dashboard
+
+
+ Income
+
+
+ Vans
+
+
+ Reviews
+
);
}
diff --git a/src/Components/Host/HostLayout.jsx b/src/Components/Host/HostLayout.jsx
new file mode 100644
index 0000000..6aaa2a1
--- /dev/null
+++ b/src/Components/Host/HostLayout.jsx
@@ -0,0 +1,15 @@
+import React from 'react'
+import { Outlet } from 'react-router-dom'
+import Header from '../Header'
+import Footer from '../Footer'
+import HostHeader from './HostHeader'
+export default function HostLayout() {
+ return (
+
+
+
+
+
+
+ )
+}
diff --git a/src/Components/VanDetails.jsx b/src/Components/VanDetails.jsx
index 14e0411..f6abb35 100644
--- a/src/Components/VanDetails.jsx
+++ b/src/Components/VanDetails.jsx
@@ -3,7 +3,6 @@ import { FaArrowLeft } from "react-icons/fa";
import Button from "./Button";
import { Link, useParams } from "react-router-dom";
import OrangeButton from "./OrangeButton";
-import Footer from "./Footer";
export default function VanDetails() {
const params = useParams();
@@ -16,7 +15,6 @@ export default function VanDetails() {
.then((data) => setVanData(data.vans));
}, [params.id]);
-// TODO: make the loader spin in the middle of screen not the top
return (
{van === null ? (