MCPcopy
hub / github.com/QuantumNous/new-api / loadStatus

Function loadStatus

web/classic/src/components/layout/PageLayout.jsx:90–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 };
89
90 const loadStatus = async () => {
91 try {
92 const res = await API.get('/api/status');
93 const { success, data } = res.data;
94 if (success) {
95 statusDispatch({ type: 'set', payload: data });
96 setStatusData(data);
97 } else {
98 showError('Unable to connect to server');
99 }
100 } catch (error) {
101 showError('Failed to load status');
102 }
103 };
104
105 useEffect(() => {
106 loadUser();

Callers 1

PageLayoutFunction · 0.85

Calls 2

setStatusDataFunction · 0.90
showErrorFunction · 0.90

Tested by

no test coverage detected