From a21c84efc6243de2d985ff12ccf0bd2a4f83a042 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 21 Nov 2025 22:45:54 +0000 Subject: [PATCH] refactor: Improve article loading error and cache messages --- webclient/src/Article.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webclient/src/Article.js b/webclient/src/Article.js index a2cff1a..1aec47e 100644 --- a/webclient/src/Article.js +++ b/webclient/src/Article.js @@ -36,7 +36,7 @@ function Article({ cache }) { localForage.setItem(id, result.story); }, (error) => { - const errorMessage = `Failed to fetch article content (ID: ${id}). Your connection may be down or the server might be experiencing issues. ${error.toString()}.`; + const errorMessage = `Failed to fetch new article content (ID: ${id}). Your connection may be down or the server might be experiencing issues. ${error.toString()}.`; setError(errorMessage); } ); @@ -60,6 +60,7 @@ function Article({ cache }) {
Connection error? Click to expand.

{error}

+ {story &&

Loaded article from cache.

}
{story ?
@@ -101,7 +102,7 @@ function Article({ cache }) { }
: -

loading...

+

Loading...

}