feat: proxy page use swr

This commit is contained in:
GyDi
2021-12-20 01:29:49 +08:00
parent 9d62462a96
commit 81aef736d6
3 changed files with 6 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ export type ProxyGroupItem = Omit<ProxyItem, "all"> & {
};
/// Get the Proxy infomation
export async function getProxyInfo() {
export async function getProxies() {
const axiosIns = await getAxios();
const response = await axiosIns.get<any, any>("/proxies");
const proxies = (response?.proxies ?? {}) as Record<string, ProxyItem>;