diff --git a/public-frontend/src/App.tsx b/public-frontend/src/App.tsx index 2ecfec7..d3322d8 100644 --- a/public-frontend/src/App.tsx +++ b/public-frontend/src/App.tsx @@ -1,9 +1,10 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import { Boxes, Search, PlusCircle, Code2 } from "lucide-react"; import Home from "./components/Home"; import ProductView from "./components/ProductView"; import Contribute from "./components/Contribute"; import ApiDocs from "./components/ApiDocs"; +import { api } from "./api"; type View = | { name: "home" } @@ -13,6 +14,14 @@ type View = export default function App() { const [view, setView] = useState({ name: "home" }); + const [qualified, setQualified] = useState(null); + + useEffect(() => { + api + .stats() + .then((s) => setQualified(s.qualified)) + .catch(() => setQualified(null)); + }, []); return (
@@ -73,6 +82,15 @@ export default function App() {