add lint js

This commit is contained in:
Romulus21
2024-03-06 09:42:12 +01:00
parent 2de7c78344
commit 115d597a09
26 changed files with 479 additions and 163 deletions

View File

@@ -1,7 +1,7 @@
import React, {useEffect, useState} from "react";
import PageLayout from "../../components/PageLayout";
import useAxiosTools from "../../hooks/AxiosTools";
import {rainfall} from "../../types";
import React, {useEffect, useState} from "react"
import PageLayout from "../../components/PageLayout"
import useAxiosTools from "../../hooks/AxiosTools"
import {rainfall} from "../../types"
const RainfallIndex = () => {
@@ -24,13 +24,9 @@ const RainfallIndex = () => {
}
}
const handleEdit = (rainfall: rainfall) => {
console.log(rainfall)
}
const handleDelete = async (rainfall: rainfall) => {
try {
const res = await axiosDelete(`/api/rainfalls/${rainfall.id}`)
await axiosDelete(`/api/rainfalls/${rainfall.id}`)
setRainfalls(rainfalls.filter(r => r.id !== rainfall.id))
} catch (error) {
errorCatch(error)
@@ -39,7 +35,7 @@ const RainfallIndex = () => {
return <PageLayout>
{errorLabel()}
<table className="border w-96 text-center mx-auto">
<table className="mx-auto w-96 border text-center">
<thead>
<tr>
<th>Date</th>