MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / loadStatus

Function loadStatus

web/src/components/layout/PageLayout.js:49–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 };
48
49 const loadStatus = async () => {
50 try {
51 const res = await API.get('/api/status');
52 const { success, data } = res.data;
53 if (success) {
54 statusDispatch({ type: 'set', payload: data });
55 setStatusData(data);
56 } else {
57 showError('Unable to connect to server');
58 }
59 } catch (error) {
60 showError('Failed to load status');
61 }
62 };
63
64 useEffect(() => {
65 loadUser();

Callers 1

PageLayout.jsFile · 0.85

Calls 2

setStatusDataFunction · 0.90
showErrorFunction · 0.90

Tested by

no test coverage detected