From 6529700006c67622258841e6c2d8868dca5c59c0 Mon Sep 17 00:00:00 2001
From: Ashwanth K <cb.en.u4cse19305@cb.students.amrita.edu>
Date: Sun, 27 Dec 2020 20:25:10 +0530
Subject: [PATCH] Upload New File

---
 client/src/Components/Forms/remove_user.jsx | 42 +++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 client/src/Components/Forms/remove_user.jsx

diff --git a/client/src/Components/Forms/remove_user.jsx b/client/src/Components/Forms/remove_user.jsx
new file mode 100644
index 0000000..0ca7a2b
--- /dev/null
+++ b/client/src/Components/Forms/remove_user.jsx
@@ -0,0 +1,42 @@
+import React, { Component } from 'react'
+import './forms.css'
+import axios from 'axios';
+export default class Udel extends Component{
+   constructor(props){
+      super(props);
+      this.state = {
+         user_id: ''
+      }
+      this.handleChange=this.handleChange.bind(this);
+      this.remove=this.remove.bind(this);
+   }
+   handleChange(event){
+      this.setState({
+         user_id : event.target.value
+      });
+     
+   }
+   remove(event){
+      axios.delete('http://localhost:5000/user/'+this.state.user_id)
+      .then(
+         window.alert((this.state.user_id.toString()).concat(" is removed!"))
+      )
+      event.preventDefault();
+   }
+   render(){
+      return(
+         <div>
+         <h3 style={{fontFamily:"Roboto",marginLeft:"20px"}}>
+            <b>REMOVE USER</b>
+         </h3>
+         <form>
+         <div><input type="text" placeholder="User_id" style={{marginLeft:"30px"}} onChange={this.handleChange} required/></div>
+        
+         <div><input type="submit" value="Remove" style={{marginBottom:"20px"}} onClick={this.remove}/></div>
+        
+        
+        </form>
+        </div>
+      )
+   }
+}
\ No newline at end of file
-- 
GitLab