Skip to content

Commit

Permalink
Merge pull request #1446 from divijshrivastava/main
Browse files Browse the repository at this point in the history
(doc): makes correction in react tutorial pertaining to issue #1445
  • Loading branch information
ernstmul authored Oct 23, 2024
2 parents e442928 + 45154de commit 9b1322a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/docs/tutorials/react/step-7/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ 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";

return (
<div>
<UserProvider>
<IdeaProvider>
<IdeasProvider>
<Navbar /> {/* Add the navbar before page content */}
<main>{isLoginPage ? <Login /> : <Home />}</main>
</IdeaProvider>
</IdeasProvider>
<UserProvider>
</div>
);
Expand Down

0 comments on commit 9b1322a

Please sign in to comment.