From d47f5eae1d0c09051b94af41a7fbc015221be0aa Mon Sep 17 00:00:00 2001 From: zoi23333 <110458414+zoi23333@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:03:27 +0200 Subject: [PATCH] Remove narbar and two previous pages --- .DS_Store | Bin 6148 -> 6148 bytes frontend/src/App.tsx | 13 +---- .../src/Components/roadDetails/TopBar.tsx | 49 +----------------- 3 files changed, 4 insertions(+), 58 deletions(-) diff --git a/.DS_Store b/.DS_Store index 5b55e34b076a57be8ce10cd0350cca860c4193e6..769a2a11c53f31ee4dbc0f43e061de0cea67df88 100644 GIT binary patch delta 34 pcmZoMXffEJ%F4(-S&cQCpMx`AK(e~p(8x$f!O+5B^90rsApnsU2uc6| delta 34 pcmZoMXffEJ%F4(wS&cQCpOZ6QK(e~p(AZo@!O+xv^90rsApnt_2vz_9 diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 21cbe27f..84b2f49e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,26 +1,17 @@ import { FC } from 'react'; import { BrowserRouter as Router, Navigate } from 'react-router-dom'; -import Navbar from './Components/Navbar'; -import RoadConditions from './pages/RoadConditions'; -import Conditions from './pages/Conditions'; - import './App.css'; - import { Route, Routes } from 'react-router-dom'; import RoadDetails from './pages/RoadDetails'; -import './App.css'; -import './css/roadDetails.css'; const App: FC = () => { return (
- - } /> - } /> - } /> + } /> + } /> diff --git a/frontend/src/Components/roadDetails/TopBar.tsx b/frontend/src/Components/roadDetails/TopBar.tsx index 05380ed8..4cf75ef9 100644 --- a/frontend/src/Components/roadDetails/TopBar.tsx +++ b/frontend/src/Components/roadDetails/TopBar.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Link, useNavigate } from 'react-router-dom'; +import { Link, useNavigate } from 'react-router-dom'; // Import useNavigate interface TopBarProps { setShowMiddleArea2: React.Dispatch>; @@ -22,7 +22,7 @@ const return_btn = ( ); const TopBar: React.FC = ({ setShowMiddleArea2 }) => { - const navigate = useNavigate(); + const navigate = useNavigate(); // Get the navigate function const handleReturn = () => { // Navigate back to the home page when the button is clicked @@ -54,48 +54,3 @@ const TopBar: React.FC = ({ setShowMiddleArea2 }) => { }; export default TopBar; - -// import React, { useState } from 'react'; -// import { Link, useNavigate } from 'react-router-dom'; - -// const return_btn = ( -// -// -// -// ); - -// const TopBar: React.FC = () => { -// const navigate = useNavigate(); -// const [showMiddleArea2, setShowMiddleArea2] = useState(false); - -// const handleReturn = () => { -// // Navigate back to the home page when the button is clicked -// navigate('/'); -// }; - -// const handleToggleMiddleArea = () => { -// // Toggle the state to show/hide MiddleArea2 -// setShowMiddleArea2((prevState) => !prevState); -// }; - -// return ( -//
-// -// {return_btn} -// -// -//
-// ); -// }; - -// export default TopBar;