upswyng
upswyng copied to clipboard
[web] Clean up Api server env vars
I noticed at least one instance where a component (useTemperature.tsx) is referencing the Server URI:
We should scrub the package and figure out a way to not have individual components reference this URI, especially with a hardcoded default. It's subject to breakage with changes. One solution would be to have a module that pulls in env vars and sets defaults if necessary, then components import values from that module. Finishing #271 would be very helpful.
Also, note that once #357 lands the client will be on the same server as the API in production so the default should reflect that.