import React, { FunctionComponent } from "react"; import style from "./style.module.css"; import { useHistory } from 'react-router'; import { base58UUID } from '../../util/uuid'; import { useStoredProjectList } from "../../hooks/use-stored-project-list"; const Home: FunctionComponent = () => { const [ projects, refreshProjects ] = useStoredProjectList(); const history = useHistory(); const openNewProject = () => { const uuid = base58UUID(); history.push(`/p/${uuid}`); }; return (

Mes projets

{/*

🔍

*/} { projects.map(p => ( 🗒️ { p.label ? p.label : "Projet sans nom" } )) } { projects.length === 0 ?

Aucun project pour l'instant.

: null }
); }; export default Home;