#768 bugfix 404 error briefly shown #805
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked-waiting-for-further-changes
bug
bug-only-on-server-for-mobile-not-webpage
Bug-Report-After-Merge
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
further-changes-needed
future-problem-not-fixint-this-period
help wanted
invalid
last-week-issue-to-fix
library
low-priority
needs input
needs review
not-implemented.
project documentation
question
research
reviewed
Script
security
SQL
style
Team 1
Team 2
team leaders
test-creation
testing
topLevel
unassigned
Under-review
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!805
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#768-404-error-in-temp-sensor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Regarding issue #768: 404 error briefly shown.
Problems: 1. Fix bug where a 404 error is shown on first render.
Solution: 1. Changed from 'any' in initial state to null which was the issue. When rendering it goes in the following order: it goes from top to down, but first all useStates --> everything else --> all useEffects. 'Any' was used before to call a random sensor in earlier patches, but has since been removed and does not work anymore. The initial state could not either be set as, for example "A-Building" since the sensor name could change in the future. Therefore it is set as null and made a return statement in useApi where if no apiurl is entered (null), it will return nothing.
Review on #805
Whats done
Tested on macOS using Chrome
Inspected following files
TemperatureView.js
useTemperature.js
+ Follows standard
sharedFeatures.js
+ Follows standard
What needs to be done
Conclusion