import React, { Component } from 1 react1; import "./App.css" class Home extends Component { url = "http://localhost:8001/courses/" state = { show: false, data:[], rating: } componentDidMount = () => { this.handleGetData() } handleGetData = () => { fetch(this.url + "get") .then((res) => res.json()) .then((json) => { this.setState({ data: json }) }) } handleApply = async (id) => { const requestoption = { method: ’post1, headers: { ’Content-Type1: 1 application/json’ } }; fetch(this.url + 'enroll/' + id, requestoption) •then(() => { this.handleGetData() }) }; handleRating = (e) => { this.setState({ rating: e.target.value }) } handleAddRating = async (id) => { const requestoption = { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ rating: this.state.rating }) } fetch(this.url + "rating/" + id, requestoption) •then(() => { this.handleGetData() }) } handleDrop = async (id) => { const requestoption = { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, }; fetch(this.url + "drop/" + id, requestoption) •then(() => { this.handleGetData() }) } render() { return (