2020-06-15 18:10:06 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { Page } from '../Page';
|
2020-06-18 09:48:45 +02:00
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
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 (
|
|
|
|
<Page title="Daddy - Accueil">
|
|
|
|
<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">
|
|
|
|
{
|
|
|
|
currentUser ?
|
|
|
|
<p>Bonjour <span className="has-text-weight-bold">{currentUser.email}</span> !</p> :
|
|
|
|
<p>Veuillez vous authentifier.</p>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2020-06-15 18:10:06 +02:00
|
|
|
</div>
|
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
}
|