mirror of
https://github.com/openziti/zrok.git
synced 2024-11-29 11:34:07 +01:00
24 lines
467 B
JavaScript
24 lines
467 B
JavaScript
import {useEffect, useState} from "react";
|
|
import * as metadata from "./api/metadata";
|
|
|
|
const Version = () => {
|
|
const [v, setV] = useState('');
|
|
|
|
useEffect(() => {
|
|
let mounted = true;
|
|
metadata.version().then(resp => {
|
|
if(mounted) {
|
|
setV(resp.data);
|
|
}
|
|
});
|
|
return () => {
|
|
mounted = false;
|
|
};
|
|
}, []);
|
|
|
|
return (
|
|
<p>{v}</p>
|
|
);
|
|
}
|
|
|
|
export default Version; |