diff options
Diffstat (limited to 'client/components/home/_home.jsx')
-rw-r--r-- | client/components/home/_home.jsx | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/client/components/home/_home.jsx b/client/components/home/_home.jsx index 405a968..7ef051c 100644 --- a/client/components/home/_home.jsx +++ b/client/components/home/_home.jsx @@ -4,6 +4,7 @@ import { ApiContext } from '../../utils/api_context'; import { AuthContext } from '../../utils/auth_context'; import { RolesContext } from '../../utils/roles_context'; import { Button } from '../common/button'; +import { Map } from '../map/_map'; import { Ping } from './ping'; export const Home = () => { @@ -33,19 +34,19 @@ export const Home = () => { } return ( - <div className="p-4"> - <h1>Welcome {user.firstName}</h1> - <Button type="button" onClick={logout}> - Logout - </Button> - {roles.includes('admin') && ( - <Button type="button" onClick={() => navigate('/admin')}> - Admin + <> + <div className="p-4"> + <h1>Welcome {user.firstName}</h1> + <Button type="button" onClick={logout}> + Logout </Button> - )} - <section> - <Ping /> - </section> - </div> + {roles.includes('admin') && ( + <Button type="button" onClick={() => navigate('/admin')}> + Admin + </Button> + )} + </div> + <Map user={user} /> + </> ); }; |