(doc): makes correction in react tutorial pertaining to issue #1445

This commit is contained in:
Divij
2024-10-22 03:05:51 +05:30
committed by GitHub
parent 68a252fbd0
commit 17ccb59244

View File

@@ -86,7 +86,7 @@ In `src/App.jsx`, wrap the `main` element with the `IdeaProvider` component.
import { Login } from "./pages/Login";
import { Home } from "./pages/Home";
import { UserProvider } from "./lib/context/user";
import { IdeaProvider } from "./lib/context/ideas";
import { IdeasProvider } from "./lib/context/ideas";
function App() {
const isLoginPage = window.location.pathname === "/login";
@@ -94,10 +94,10 @@ function App() {
return (
<div>
<UserProvider>
<IdeaProvider>
<IdeasProvider>
<Navbar /> {/* Add the navbar before page content */}
<main>{isLoginPage ? <Login /> : <Home />}</main>
</IdeaProvider>
</IdeasProvider>
<UserProvider>
</div>
);