diff --git a/frontend/src/components/Footer.jsx b/frontend/src/components/Footer.jsx index 85cf84f1f2..4e8ae2dc0a 100644 --- a/frontend/src/components/Footer.jsx +++ b/frontend/src/components/Footer.jsx @@ -1,9 +1,10 @@ -import React, { useContext } from "react"; +import React, { useContext, useState, useEffect } from "react"; import { Container, Row, Col } from "react-bootstrap"; import { FormattedMessage } from "react-intl"; import FooterLink from "./footer/FooterLink"; import ThemeColorContext from "../ThemeColorProvider"; import FooterVisibilityContext from "../FooterVisibilityContext"; +import useGetSiteSettings from "../models/useGetSiteSettings"; import { footerLinks1, footerLinks2, @@ -13,7 +14,13 @@ import { const Footer = () => { const theme = useContext(ThemeColorContext); const { visible } = useContext(FooterVisibilityContext); - + const [version, setVersion] = useState(); + const { data } = useGetSiteSettings(); + useEffect(() => { + if (data) { + setVersion(data.system.wildbookVersion); + } + }, [data]); return visible ? (