/* eslint-disable */ export const hideAlert = () => { const el = document.querySelector('.alert'); if (el) el.parentElement.removeChild(el); }; // type is 'success' or 'error' export const showAlert = (type, msg) => { hideAlert(); const markup = `
${msg}
`; document.querySelector('body').insertAdjacentHTML('afterbegin', markup); window.setTimeout(hideAlert, 5000); };