Skip to content

Commit

Permalink
Replace darkMode state w/ new useStickyState hook
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Aug 2, 2021
1 parent 82af2c6 commit 905f656
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { Switch, Route } from "react-router-dom";
import PrivateRoute from "./components/PrivateRoute/";
import AppView from "./components/AppView/";
import LoginForm from "./components/LoginForm/";
import { useStickyState } from "./utilities";

function App() {
const [darkMode, setDarkMode] = useState(false);
const [darkMode, setDarkMode] = useStickyState(false);

const theme = webqueueTheme(darkMode);

Expand All @@ -20,7 +21,7 @@ function App() {
<PrivateRoute path="/">
<AppView setDarkMode={setDarkMode} />
</PrivateRoute>
</Switch>
</Switch>
</ThemeProvider>
);
}
Expand Down

0 comments on commit 905f656

Please sign in to comment.