add Rainfalls Index page

This commit is contained in:
Romulus21
2023-09-14 23:20:29 +02:00
parent 42f03707d9
commit 4a733929ed
11 changed files with 177 additions and 26 deletions

View File

@@ -3,6 +3,7 @@ import useAxiosTools from "../../hooks/AxiosTools";
import {rainfall} from "../../types";
import {AxiosError} from "axios";
import Card from "../Card";
import {Link} from "react-router-dom";
const LastFiveMesure: FC<LastFiveMesureProps> = ({loadedAt}) => {
@@ -26,7 +27,7 @@ const LastFiveMesure: FC<LastFiveMesureProps> = ({loadedAt}) => {
}
}
return <Card className="min-w-[200px] overflow-hidden self-start w-full lg:w-auto">
return <><Card className="min-w-[200px] overflow-hidden self-start w-full lg:w-auto">
<h1 className="text-center bg-blue-500 text-white -mx-2 -mt-1 text-lg font-bold px-2 py-1">5 dernières mesures</h1>
{error && <div>{error}</div>}
<table className="w-full text-center">
@@ -38,6 +39,8 @@ const LastFiveMesure: FC<LastFiveMesureProps> = ({loadedAt}) => {
</tbody>
</table>
</Card>
<Link to="/pluviometrie/mesures">Tous les mesures</Link>
</>
}
export default LastFiveMesure