From bb7e0e4f13eca345d12c3d589b9ba4e91da2ff7d Mon Sep 17 00:00:00 2001 From: Anneshu Nag <132702983+NK-Works@users.noreply.github.com> Date: Thu, 7 Nov 2024 01:14:15 +0530 Subject: [PATCH] updated rendering of the router Signed-off-by: Anneshu Nag <132702983+NK-Works@users.noreply.github.com> --- client/src/App.jsx | 67 ++++++++++++++++++++++----------------------- client/src/main.jsx | 6 ++-- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index f57a36f..8a62c0d 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -3,7 +3,7 @@ import { modeAtom } from "./atom/Atom"; import { useEffect, useState } from "react"; import "./App.css"; import "./index.css"; -import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; +import { Routes, Route } from "react-router-dom"; import PropTypes from "prop-types"; import LoadingBar from "react-top-loading-bar"; import About from "./component/About"; @@ -40,7 +40,6 @@ import Collab from "./component/Collab"; import FAQ from "./component/Faq"; import CreateBlog from "./component/CreateBlog"; -// Main Layout Component const Layout = ({ children, mode, setProgress, toggleMode, showAlert }) => { return (
@@ -121,39 +120,37 @@ function App() { - - setProgress(0)} /> -
- - - - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - -
+ setProgress(0)} /> +
+ + + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + +
diff --git a/client/src/main.jsx b/client/src/main.jsx index f4de051..1b01a65 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -1,5 +1,5 @@ /** @format */ - +import { BrowserRouter } from "react-router-dom"; import ReactDOM from "react-dom/client"; import App from "./App.jsx"; import "./index.css"; @@ -8,10 +8,10 @@ import { AuthProvider } from "./contexts/authContext/index.jsx"; // import Alert from "./component/Alert"; ReactDOM.createRoot(document.getElementById("root")).render( - <> + - + );