mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-24 03:47:15 +00:00
fix(frontend): add missing react-hooks/exhaustive-deps
ESLint failed the frontend build on four react-hooks/exhaustive-deps errors. Add the missing dependencies: the hysteria streamSettings effect now lists form, and the inbounds page prompt/import/general-action callbacks now list t. Both form (Form.useForm) and t (useTranslation) are stable references, so no extra re-renders or loops.
This commit is contained in:
@@ -168,7 +168,7 @@ export default function OutboundFormModal({
|
||||
if (existing.hysteriaSettings) slice.hysteriaSettings = existing.hysteriaSettings;
|
||||
if (existing.tlsSettings) slice.tlsSettings = existing.tlsSettings;
|
||||
form.setFieldValue('streamSettings', slice);
|
||||
}, [protocol, network, security]);
|
||||
}, [protocol, network, security, form]);
|
||||
|
||||
const wgSecretKey = Form.useWatch(['settings', 'secretKey'], form) as string | undefined;
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user