-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import httpClient from "../../common/httpClient"; | ||
import Page from "../../components/page"; | ||
import { Badge } from "@mantine/core"; | ||
import { useEffect, useState } from "react"; | ||
|
||
const Health = () => { | ||
const [status, setStatus] = useState<any>(); | ||
useEffect(() => { | ||
load(); | ||
|
||
async function load() { | ||
const res = await httpClient.get("health"); | ||
console.log(res); | ||
setStatus(res); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<Page title="Health"> | ||
<div className="flex items-center gap-3"> | ||
<span>API Health: </span> | ||
<Badge className="uppercase">{status && status.message}</Badge> | ||
</div> | ||
</Page> | ||
); | ||
}; | ||
|
||
export default Health; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters