Skip to content

Commit

Permalink
feat(frontend): add state (context) to main App
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaVls committed Dec 16, 2021
1 parent 218f82c commit 711ed5d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ReactElement, useContext, useEffect } from "react";
import { GlobalContext } from "./context/GlobalState";
import { Loader, Conditions, NavBar, CurrentWeather } from "./components";
import "./App.css";

function App(): ReactElement {
const {
Expand Down Expand Up @@ -28,16 +29,18 @@ function App(): ReactElement {

return (
<>
{forecast && geocoding ? (
<section className="mobile-container">
<NavBar />
<CurrentWeather />
<section className="app">
{forecast && geocoding ? (
<>
<NavBar />
<CurrentWeather />

<Conditions />
</section>
) : (
<Loader />
)}
<Conditions />
</>
) : (
<Loader />
)}
</section>
</>
);
}
Expand Down

0 comments on commit 711ed5d

Please sign in to comment.