File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { useContext , useState } from "react" ;
22import { LocaleContext } from "../../../providers/LocaleProvider" ;
33
4- // const ADMIN_TOKEN = "adminToken";
5-
64interface ApiSettingsResult {
75 name : string
86 value : string
@@ -12,29 +10,6 @@ const ApiPage = () => {
1210 const { locale } = useContext ( LocaleContext )
1311 const [ response ] = useState < ApiSettingsResult [ ] > ( )
1412
15- // const refreshStatus = () => {
16- // fetch(`/api/admin/status`, {
17- // method: "GET",
18- // headers: {
19- // Authorization: `Bearer ${localStorage.getItem(ADMIN_TOKEN)}`,
20- // },
21- // })
22- // .then((result) => {
23- // if (result.status > 400 && result.status < 500) {
24- // localStorage.removeItem(ADMIN_TOKEN)
25- // return;
26- // }
27- // return result.json();
28- // })
29- // .then((result) => {
30- // setResponse(() => result)
31- // });
32- // };
33-
34- // useEffect(() => {
35- // refreshStatus()
36- // }, [])
37-
3813 return (
3914 < div className = "p-6 w-full max-w-6xl mx-auto" >
4015 < h1 className = "text-3xl font-bold mb-6" > { locale . admin_page_api . title } </ h1 >
You can’t perform that action at this time.
0 commit comments