Skip to content
Snippets Groups Projects
Commit 1a449ae0 authored by Arthur E. Jones's avatar Arthur E. Jones Committed by James Long
Browse files

fix: wrap async func in useEffect

parent 3290e739
No related branches found
No related tags found
No related merge requests found
...@@ -476,14 +476,16 @@ function SettingsLink({ to, name, style, first, last }) { ...@@ -476,14 +476,16 @@ function SettingsLink({ to, name, style, first, last }) {
function Version() { function Version() {
let [version, setVersion] = useState(''); let [version, setVersion] = useState('');
useEffect(async () => { useEffect(() => {
const { error, version } = await send('get-server-version'); (async () => {
const { error, version } = await send('get-server-version');
if (error) {
setVersion(''); if (error) {
} else { setVersion('');
setVersion(version); } else {
} setVersion(version);
}
})();
}, []); }, []);
return ( return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment