mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-05-03 18:39:49 -05:00
Reformatted the ConfigContext.jsx
This commit is contained in:
@@ -12,9 +12,9 @@ export const ConfigProvider = (props) => {
|
||||
|
||||
const reloadConfig = () => {
|
||||
request("/config").then(res => {
|
||||
if (!res.ok) throw "No connection to server";
|
||||
return res.json();
|
||||
})
|
||||
if (!res.ok) throw "No connection to server";
|
||||
return res.json();
|
||||
})
|
||||
.then(result => setConfig(result))
|
||||
.catch(() => setDialog(passwordRequiredDialog));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user