From 3972e6ca1a0b66cbeda175c1ea15e5f7d877993a Mon Sep 17 00:00:00 2001 From: Collin Beczak <88843144+CollinBeczak@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:25:04 -0500 Subject: [PATCH] Add Api Version Number in Footer (#2075) * Add Api Version Number in Footer * fix formatting --- src/components/Footer/Footer.js | 36 +++++++++++++++++++++++++++++++ src/components/Footer/Messages.js | 5 +++++ 2 files changed, 41 insertions(+) diff --git a/src/components/Footer/Footer.js b/src/components/Footer/Footer.js index d326d75fc..77ba32e69 100644 --- a/src/components/Footer/Footer.js +++ b/src/components/Footer/Footer.js @@ -4,6 +4,29 @@ import SvgSymbol from '../SvgSymbol/SvgSymbol' import messages from './Messages' class Footer extends Component { + constructor(props) { + super(props); + + this.state = { + data : null + }; + } + + componentDidMount() { + this.renderMyData(); + } + + renderMyData(){ + fetch(`${process.env.REACT_APP_MAP_ROULETTE_SERVER_URL}/api/v2/service/info`) + .then((response) => response.json()) + .then((responseJson) => { + this.setState({ data : responseJson }) + }) + .catch((error) => { + console.error(error); + }); + } + render() { return (