Skip to content

Commit bae9868

Browse files
wuriyantowuriyanto
authored andcommitted
ui: automatic reload after server down
1 parent 4163fee commit bae9868

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dashboard/ui/src/pages/dashboard.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ function Dashboard() {
2222
useEffect(() => {
2323
const fetchServiceData = async () => {
2424
try {
25+
26+
// Reset error state before each fetch attempt
27+
setError(null);
28+
2529
const response = await fetch('/api/services', {
2630
method: 'GET',
2731
headers: {

0 commit comments

Comments
 (0)