Created
March 27, 2021 21:05
-
-
Save patrickcze/fdccd0e592b32ec4fc5682506c87e5d5 to your computer and use it in GitHub Desktop.
OnlineStatusProvider example app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; | |
import Home from "../Home"; | |
import { OnlineStatusProvider } from "../../utilities/useOnlineStatus"; | |
const App: React.FC = () => { | |
return ( | |
<OnlineStatusProvider> | |
<Router> | |
<Switch> | |
<Route path="/home" exact> | |
<Home /> | |
</Route> | |
</Switch> | |
</Router> | |
</OnlineStatusProvider> | |
); | |
}; | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment