feat: move standard proxy configured logic

This commit is contained in:
karishmas6
2024-10-26 23:39:14 +05:30
parent 80300a3db7
commit cf0db5f898

View File

@@ -134,7 +134,15 @@ const ProxyForm: React.FC = () => {
return ( return (
<> <>
{ <FormContainer>
<Typography variant="h6" gutterBottom component="div" style={{ marginTop: '20px' }}>
Proxy Configuration
</Typography>
<Tabs value={tabIndex} onChange={handleTabChange}>
<Tab label="Standard Proxy" />
<Tab label="Automatic Proxy Rotation" />
</Tabs>
{tabIndex === 0 && (
isProxyConfigured ? ( isProxyConfigured ? (
<Box sx={{ maxWidth: 600, width: '100%', textAlign: 'center', marginTop: '20px' }}> <Box sx={{ maxWidth: 600, width: '100%', textAlign: 'center', marginTop: '20px' }}>
<Box sx={{ maxWidth: 600, width: '100%', textAlign: 'center', marginTop: '20px' }}> <Box sx={{ maxWidth: 600, width: '100%', textAlign: 'center', marginTop: '20px' }}>
@@ -166,15 +174,6 @@ const ProxyForm: React.FC = () => {
</Button> </Button>
</Box> </Box>
) : ( ) : (
<FormContainer>
<Typography variant="h6" gutterBottom component="div" style={{ marginTop: '20px' }}>
Proxy Configuration
</Typography>
<Tabs value={tabIndex} onChange={handleTabChange}>
<Tab label="Standard Proxy" />
<Tab label="Automatic Proxy Rotation" />
</Tabs>
{tabIndex === 0 && (
<Box component="form" onSubmit={handleSubmit} sx={{ maxWidth: 400, width: '100%' }}> <Box component="form" onSubmit={handleSubmit} sx={{ maxWidth: 400, width: '100%' }}>
<FormControl> <FormControl>
<TextField <TextField
@@ -235,7 +234,7 @@ const ProxyForm: React.FC = () => {
Add Proxy Add Proxy
</Button> </Button>
</Box> </Box>
)} ))}
{tabIndex === 1 && ( {tabIndex === 1 && (
<Box sx={{ maxWidth: 600, width: '100%', textAlign: 'center', marginTop: '20px' }}> <Box sx={{ maxWidth: 600, width: '100%', textAlign: 'center', marginTop: '20px' }}>
<> <>
@@ -250,7 +249,6 @@ const ProxyForm: React.FC = () => {
)} )}
</FormContainer> </FormContainer>
) )
}
</> </>
); );
}; };