Displaying name and version in footer.

This commit is contained in:
Roland 2022-01-30 16:59:26 -07:00
parent 3821722d0c
commit 8170313dd7
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
5 changed files with 35 additions and 2 deletions

View file

@ -0,0 +1,17 @@
import {useEffect, useState} from "react";
import {getVersion} from "../api";
export const useVersion = () => {
const [version, setVersion] = useState('');
const fetchVersion = async () => {
let version = await getVersion();
setVersion(version);
}
useEffect(() => {
fetchVersion();
})
return version;
}