diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 69b41fdf4..de2d5dc68 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -46,6 +46,15 @@ export default function App() { }> >([]); + // Initialize state variable for the version + const [version, setVersion] = useState(""); + useEffect(() => { + fetch("/version") + .then((res) => res.json()) + .then((data) => { + setVersion(data.version); + }); + }, []); // Use effect hook to update alertsList when a new alert is added useEffect(() => { // If there is an error alert open with data, add it to the alertsList @@ -158,9 +167,10 @@ export default function App() { - Created by Logspace + {version &&
⛓️ LangFlow v{version}
} +
Created by Logspace
);