fixed try catch added more todos to loading

This commit is contained in:
darkicewolf50 2024-03-13 13:22:27 -06:00
parent 23f9511990
commit be40d96f0e

View File

@ -26,12 +26,11 @@ const OurSponsors = () => {
* @todo add gPRC to backend and front end add connect to synology drive
*/
const getSponsors = async () => {
try {
const res = await fetch(sponsorData);
const rawText = await res.text();
const yamlDict = yaml.load(rawText);
try {
let res = yamlDict;
setSponsorsDict(res);
setSponsorsDict(yamlDict);
} catch (error) {
//error checking
console.error("Error recieving data from server:");
@ -40,6 +39,7 @@ const OurSponsors = () => {
if (!sponsorsDict) {
//awaiting for a resposne from the backend
//add loading notification to user
return <p>Loading...</p>;
}
if (sponsorsDict) {