Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh Render Issue Solved #403

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -42,7 +42,6 @@ import CreateBlog from "./component/CreateBlog";
import Projects from "./component/Projects";
import UploadProject from "./component/UploadProject";

// Main Layout Component
const Layout = ({ children, mode, setProgress, toggleMode, showAlert }) => {
return (
<div className="h-full w-full">
Expand Down Expand Up @@ -124,8 +123,8 @@ function App() {
<Cursor />
<ProjectState>
<ProfileState>
<Router>
<LoadingBar color="blue" progress={progress} onLoaderFinished={() => setProgress(0)} />

<LoadingBar color="blue" progress={progress} onLoaderFinished={() => setProgress(0)} />
<div className="alert-container"> <Alert alert={alert} /> </div>
<ProgressBar mode={mode} />
<ScrollTop />
Expand Down Expand Up @@ -158,7 +157,7 @@ function App() {
<Route exact path='/*' element={<NotFound />} />
</Routes>
</Layout>
</Router>

</ProfileState>
</ProjectState>
</div>
Expand Down
6 changes: 3 additions & 3 deletions client/src/main.jsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -8,10 +8,10 @@ import { AuthProvider } from "./contexts/authContext/index.jsx";
// import Alert from "./component/Alert";

ReactDOM.createRoot(document.getElementById("root")).render(
<>
<BrowserRouter>
<AuthProvider>
<App />
<Toaster />
</AuthProvider>
</>
</BrowserRouter>
);