2020-06-22 12:06:42 +02:00
|
|
|
import React, { useEffect } from 'react';
|
2020-06-15 18:10:06 +02:00
|
|
|
import { Page } from '../Page';
|
2020-06-22 12:06:42 +02:00
|
|
|
import { useSelector, useDispatch } from 'react-redux';
|
2020-06-18 09:48:45 +02:00
|
|
|
import { RootState } from '../../store/reducers/root';
|
2020-06-15 18:10:06 +02:00
|
|
|
|
|
|
|
export function HomePage() {
|
2020-06-18 09:48:45 +02:00
|
|
|
const currentUser = useSelector((state: RootState) => state.auth.currentUser);
|
|
|
|
|
2020-06-15 18:10:06 +02:00
|
|
|
return (
|
2020-07-16 20:21:58 +02:00
|
|
|
<Page title="Accueil">
|
2020-06-15 18:10:06 +02:00
|
|
|
<div className="container is-fluid">
|
2020-06-18 09:48:45 +02:00
|
|
|
<section className="section">
|
|
|
|
<div className="columns">
|
|
|
|
<div className="column is-4 is-offset-4">
|
|
|
|
<div className="box">
|
|
|
|
{
|
2020-07-13 18:49:44 +02:00
|
|
|
currentUser && currentUser.email ?
|
2020-07-16 20:21:58 +02:00
|
|
|
<p>Bonjour <span className="has-text-weight-bold">{currentUser.name ? currentUser.name : currentUser.email}</span> !</p> :
|
2020-06-18 09:48:45 +02:00
|
|
|
<p>Veuillez vous authentifier.</p>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2020-06-15 18:10:06 +02:00
|
|
|
</div>
|
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
}
|