clemsonMakerspace / unified-makerspace

The Makerspace - now unified.
Apache License 2.0
9 stars 11 forks source link

Moved Amplify config setup into useEffect in App component #151

Closed lesesne closed 9 months ago

lesesne commented 9 months ago

Issue fixed: The 'getAmplifyConfig' function was running before any components were rendered, so during the initial page load, window.location.hostname was not set to either "visit.cumaker.space" or "beta-visit.cumaker.space", causing the default configuration to be used.

Mjtlittle commented 9 months ago

Hmmm not sure why this would be the case. I wouldn't think there would be an asynchronous population of that value between script load and react render. You have to visit and resolve that hostname to even retrieve those values and run the script. I may be missing something though.

Benign change either way, merged!