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