()
| 116 | const [showDrawer, setShowDrawer] = useState(false); |
| 117 | |
| 118 | const fetchStudents = () => |
| 119 | getAllStudents() |
| 120 | .then(res => res.json()) |
| 121 | .then(data => { |
| 122 | console.log(data); |
| 123 | setStudents(data); |
| 124 | }).catch(err => { |
| 125 | console.log(err.response) |
| 126 | err.response.json().then(res => { |
| 127 | console.log(res); |
| 128 | errorNotification( |
| 129 | "There was an issue", |
| 130 | `${res.message} [${res.status}] [${res.error}]` |
| 131 | ) |
| 132 | }); |
| 133 | }).finally(() => setFetching(false)) |
| 134 | |
| 135 | useEffect(() => { |
| 136 | console.log("component is mounted"); |
no test coverage detected