add Rainfalls Index page
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user