loader: error handling

This commit is contained in:
muerwre 2018-12-11 12:44:10 +07:00
parent 71a0aed9aa
commit 1c014ec9fb
5 changed files with 102 additions and 12 deletions

View file

@ -26,3 +26,11 @@ export const parseQuery = (queryString: string) => {
}
return params;
};
export const pushLoaderState = state => {
document.getElementById('loader-bar').style.width = `${state}%`;
};
export const pushNetworkInitError = state => {
document.getElementById('loader-error').style.opacity = 1;
};