From 9572061c32caaefb975e6329e6587ecb8ca44bea Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 2 Oct 2024 23:40:46 +0530 Subject: [PATCH] refactor: rename to server_url --- src/components/organisms/ProxyForm.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index 47e6c305..62869fc9 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -18,13 +18,13 @@ const FormControl = styled(Box)({ const ProxyForm: React.FC = () => { const [proxyConfig, setProxyConfig] = useState({ - server: '', + server_url: '', username: '', password: '', }); const [requiresAuth, setRequiresAuth] = useState(false); const [errors, setErrors] = useState({ - server: '', + server_url: '', username: '', password: '', }); @@ -33,10 +33,10 @@ const ProxyForm: React.FC = () => { const validateForm = () => { let valid = true; - let errorMessages = { server: '', username: '', password: '' }; + let errorMessages = { server_url: '', username: '', password: '' }; - if (!proxyConfig.server) { - errorMessages.server = 'Server URL is required'; + if (!proxyConfig.server_url) { + errorMessages.server_url = 'Server URL is required'; valid = false; } @@ -92,13 +92,13 @@ const ProxyForm: React.FC = () => { @@ -141,7 +141,7 @@ const ProxyForm: React.FC = () => { color="primary" type="submit" fullWidth - disabled={!proxyConfig.server || (requiresAuth && (!proxyConfig.username || !proxyConfig.password))} + disabled={!proxyConfig.server_url || (requiresAuth && (!proxyConfig.username || !proxyConfig.password))} > Add Proxy