From 855e61b7708b80b12f89198bb356048d25d3539c Mon Sep 17 00:00:00 2001 From: Henry <31442053+HenrySpartGlobal@users.noreply.github.com> Date: Sun, 18 Feb 2024 11:38:30 +0000 Subject: [PATCH] chore: remove status page (#61) * chore: remove status page * chore: remove status page * chore: remove status page * chore: remove status page * chore: remove status page --- src/partials/Footer.tsx | 5 ---- src/partials/Home/StatCards.tsx | 50 ++++----------------------------- src/partials/Navbar.tsx | 4 --- 3 files changed, 5 insertions(+), 54 deletions(-) diff --git a/src/partials/Footer.tsx b/src/partials/Footer.tsx index 4932163..c7b77cc 100644 --- a/src/partials/Footer.tsx +++ b/src/partials/Footer.tsx @@ -43,11 +43,6 @@ export default function Footer(props: { withBorder?: boolean }) { Donate -
  • - - Status - -
  • Documentation diff --git a/src/partials/Home/StatCards.tsx b/src/partials/Home/StatCards.tsx index a6ed3b0..d8607ef 100644 --- a/src/partials/Home/StatCards.tsx +++ b/src/partials/Home/StatCards.tsx @@ -4,67 +4,27 @@ import React from "react"; import StatCard from "../../components/StatCard/StatCard"; -interface IStatsProps { - status: string; - last_check: string; - message: string; - server_count: number; - total_games: number; - total_users: number; -} - export default function StatCards() { - const [stats, setStats] = React.useState(); - - const fetchStats = async () => { - const header = { - "method": "GET", - "Access-Control-Allow-Origin": "*", - "Content-Type": "application/json" - }; - - try { - const res = await fetch("https://health.inhousequeue.xyz/health", { headers: header }); - const data = await res.json() as IStatsProps; // Type assertion here - setStats(data); - } catch(err) { - console.log(err); - setStats({ - status: "unoperational", - last_check: "", - message: "", - server_count: 700, - total_games: 10000, - total_users: 12000 - }) - } - }; - - React.useEffect(() => { - void fetchStats(); - }, []) - + // Directly use the hardcoded values in your JSX return (
    - -
    - ) + ); } \ No newline at end of file diff --git a/src/partials/Navbar.tsx b/src/partials/Navbar.tsx index 8c4b2d7..5fc8fd3 100644 --- a/src/partials/Navbar.tsx +++ b/src/partials/Navbar.tsx @@ -22,10 +22,6 @@ const links = [ name: "GitHub", href: "https://github.com/HenrySpartGlobal/InHouseQueue" }, - { - name: "Status", - href: "https://inhousequeue.statuspage.io/" - }, { name: "Documentation", href: "https://docs.inhousequeue.xyz"