From fd783c299db780d8169762dfba2f64ee86160b52 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 26 Oct 2024 05:37:56 +0530 Subject: [PATCH] feat: get proxy config --- src/components/organisms/ProxyForm.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index f3fd38fd..4fdde1c3 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -99,6 +99,18 @@ const ProxyForm: React.FC = () => { }); }; + // get proxy config + const fetchProxyConfig = async () => { + await getProxyConfig().then((response) => { + if (response.proxy_url) { + setIsProxyConfigured(true); + notify('success', 'Proxy configuration fetched successfully'); + } else { + notify('error', 'Failed to fetch proxy configuration. Try again.'); + } + }); + }; + return (