feat: fetch proxy config on load
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { styled } from '@mui/system';
|
import { styled } from '@mui/system';
|
||||||
import { TextField, Button, Switch, FormControlLabel, Box, Typography, Tabs, Tab } from '@mui/material';
|
import { TextField, Button, Switch, FormControlLabel, Box, Typography, Tabs, Tab } from '@mui/material';
|
||||||
import { sendProxyConfig, getProxyConfig, testProxyConfig } from '../../api/proxy';
|
import { sendProxyConfig, getProxyConfig, testProxyConfig } from '../../api/proxy';
|
||||||
@@ -109,7 +109,12 @@ const ProxyForm: React.FC = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
fetchProxyConfig();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
<FormContainer>
|
<FormContainer>
|
||||||
<Typography variant="h6" gutterBottom component="div" style={{ marginTop: '20px' }}>
|
<Typography variant="h6" gutterBottom component="div" style={{ marginTop: '20px' }}>
|
||||||
Proxy Configuration
|
Proxy Configuration
|
||||||
@@ -193,6 +198,7 @@ const ProxyForm: React.FC = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</FormContainer>
|
</FormContainer>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user