RastonLab / Virtual-HeNDI-Spectrometer

Helium NanoDroplet Isolation - Scientific Instrument Simulator (HeNDI-SIS)
https://hendi.rastonlab.org/
GNU General Public License v3.0
0 stars 3 forks source link

Fix React errors and warnings #50

Closed vanfossen closed 2 years ago

vanfossen commented 2 years ago

Currently not entirely sure of the exact problems. Some warning are of unused variables. At one point there were warnings from depreciated function calls.

vanfossen commented 2 years ago

Fixed multiple warnings in the program. Most were caused by unused statements.

The following warnings still exist. Currently unsure how to fin:

WARNING in [eslint] 
src/components/Spectrum.jsx
  Line 8:7:   'd' is assigned a value but never used                                                                                                                                                                                                                                              no-unused-vars
  Line 22:9:  Assignments to the 'd' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect  react-hooks/exhaustive-deps
vanfossen commented 2 years ago

Fixed the last two existing warnings