0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 08:58:11 +00:00

Merge pull request #4674 from naturalcrit/update-dependencies

bring back error pages
This commit is contained in:
Víctor Losada Hernández
2026-03-11 13:03:49 +01:00
committed by GitHub
3 changed files with 14 additions and 3 deletions

View File

@@ -52,6 +52,19 @@ const Homebrew = (props)=>{
updateLocalStorage(); updateLocalStorage();
if(brew.pureError) {
return (
<Router>
<div className={`homebrew${(config?.deployment || config?.local) ? ' deployment' : ''}`} style={backgroundObject()}>
<Routes>
<Route path={brew.originalUrl} element={<WithRoute el={ErrorPage} brew={brew} />} />
</Routes>
</div>
</Router>
);
}
return ( return (
<Router> <Router>
<div className={`homebrew${(config?.deployment || config?.local) ? ' deployment' : ''}`} style={backgroundObject()}> <div className={`homebrew${(config?.deployment || config?.local) ? ' deployment' : ''}`} style={backgroundObject()}>

View File

@@ -196,7 +196,6 @@ const EditPage = (props)=>{
saveTimeout.current = setTimeout(async ()=>{ saveTimeout.current = setTimeout(async ()=>{
setIsSaving(true); setIsSaving(true);
setError(null); setError(null);
console.log(currentBrew);
await save(currentBrew, saveGoogle) await save(currentBrew, saveGoogle)
.catch((err)=>{ .catch((err)=>{
setError(err); setError(err);

View File

@@ -1,7 +1,6 @@
.homebrew { .homebrew {
.uiPage.sitePage { .uiPage.sitePage:has(.errorTitle) {
.errorTitle { .errorTitle {
//background-color: @orange;
color : #D02727; color : #D02727;
text-align : center; text-align : center;
} }