0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 15:52:43 +00:00

Add proper error popup when theme fails to load

This commit is contained in:
Trevor Buckner
2024-07-28 16:45:01 -04:00
parent edec9369ec
commit 8aa88a2e45
7 changed files with 56 additions and 23 deletions

View File

@@ -104,6 +104,18 @@ const ErrorNavItem = createClass({
</Nav.item>;
}
if(HBErrorCode === '09') {
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={clearError}>
Looks like there was a problem retreiving
the theme, or a theme that it inherits,
for this brew. Verify that brew <a className='lowercase' target='_blank' rel='noopener noreferrer' href={`/share/${response.body.brewId}`}>
{response.body.brewId}</a> still exists!
</div>
</Nav.item>;
}
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer'>