Faro & grafana improvements
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m46s
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled

This commit is contained in:
Antoni Nuñez Romeu
2026-07-07 23:40:04 +02:00
parent aae3ac04af
commit 6612c8b10c
5 changed files with 99 additions and 13 deletions
+13 -3
View File
@@ -9,6 +9,7 @@ import AdminView from './views/AdminView';
import LoginModal from './components/LoginModal';
import SavedNotifications from './components/SavedNotifications';
import BottomNav from './components/BottomNav';
import { getFaro } from './utils/faro';
function App() {
const [screen, setScreen] = useState('home');
@@ -40,7 +41,10 @@ function App() {
fetch('/api/auth/check')
.then(r => r.json())
.then(data => { if (data.authenticated) setCurrentUser(data.user); })
.catch(() => {})
.catch((err) => {
console.warn('[auth/check]', err);
getFaro()?.pushError(err, { type: 'network', url: '/api/auth/check' });
})
.finally(() => setAuthChecked(true));
window.addEventListener('resize', handleResize);
@@ -57,7 +61,10 @@ function App() {
const count = (data.global?.length || 0) + (data.pharmacy?.length || 0);
setBadgeCount(count);
})
.catch(() => {});
.catch((err) => {
console.warn('[notifications/mine]', err);
getFaro()?.pushError(err, { type: 'network', url: '/api/notifications/mine' });
});
return () => { cancelled = true; };
}, [currentUser]);
@@ -69,7 +76,10 @@ function App() {
if (!data) return;
setBadgeCount((data.global?.length || 0) + (data.pharmacy?.length || 0));
})
.catch(() => {});
.catch((err) => {
console.warn('[refreshBadge]', err);
getFaro()?.pushError(err, { type: 'network', url: '/api/notifications/mine' });
});
}
function handleLogin(user) {