Commit 1659b81e by Ajmal.S

corrections

parent 0964c6f6
......@@ -33,8 +33,10 @@ function App() {
};
const deleteStudent = async (id) => {
if(window.confirm('Are you sure you want to Delete?') === true) {
await fetch(`http://localhost:5000/students/${id}`, { method: 'DELETE' })
setStudentsData(studentsData.filter((data) => data.id !== id))
}
}
const updateStudent = async (id) => {
......@@ -47,7 +49,7 @@ function App() {
},
body: JSON.stringify(item)
})
const data = await response.json()
const data = await response.json();
}
const handleEditChange = (id, text, mark) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment