Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (10 sloc) 331 Bytes
import React, { useContext } from "react";
import UsersPage from "./UsersPage";
import AuthContext from "./AuthContext";
import LoginPage from "./LoginPage";
const App: React.FunctionComponent = () => {
const { info } = useContext(AuthContext);
// guard
return info ? <UsersPage /> : <LoginPage />;
};
export default App;
You can’t perform that action at this time.