Web: Files: add error handler

This commit is contained in:
Viktor Fomin 2021-09-14 14:13:02 +03:00
parent 551c623541
commit d6bc9155d0

View File

@ -51,6 +51,7 @@ const bannerHOC = (WrappedComponent) => (props) => {
index++;
}
try {
const translationUrl = await loadLanguagePath();
setBannerTranslation(translationUrl);
@ -72,6 +73,9 @@ const bannerHOC = (WrappedComponent) => (props) => {
campaign.toLowerCase()
);
setBannerImage(image);
} catch (e) {
console.error(e);
}
localStorage.setItem("bannerIndex", index);
};