From e853e9ad8627c0c34943fa6d788866a91af7eb79 Mon Sep 17 00:00:00 2001 From: Darran Boyd Date: Mon, 25 Nov 2024 17:15:24 +1100 Subject: [PATCH] feat(browser-extension): fix eslint --- .../entrypoints/popup/ConfigDetailView.tsx | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/packages/threat-composer-app-browser-extension/src/entrypoints/popup/ConfigDetailView.tsx b/packages/threat-composer-app-browser-extension/src/entrypoints/popup/ConfigDetailView.tsx index e3c06c9..ecfcfbb 100644 --- a/packages/threat-composer-app-browser-extension/src/entrypoints/popup/ConfigDetailView.tsx +++ b/packages/threat-composer-app-browser-extension/src/entrypoints/popup/ConfigDetailView.tsx @@ -26,35 +26,36 @@ export interface ConfigDetailViewProps { } export const ConfigDetailView: FC = () => { - const navigate = useNavigate(); - const { integrationType } = useParams<{ integrationType: string }>(); - const { config, setConfig } = useContext(ExtensionConfigContext); - const integrationConfig = useMemo(() => config.integrations[integrationType!], [integrationType, config]); - const setIntegrationConfig = useCallback((newIntegrationConfig: Partial) => { - setConfig((prev) => { - return { - ...prev, integrations: { - ...prev.integrations, - [integrationType!]: - { ...prev.integrations[integrationType!], ...newIntegrationConfig } - } - }; - }); - }, [integrationType, setConfig]); - return ( -
- - - )}> - { setIntegrationConfig({ urlRegexes: newRegexes }); }}> - - - - -
- - ); + const navigate = useNavigate(); + const { integrationType } = useParams<{ integrationType: string }>(); + const { config, setConfig } = useContext(ExtensionConfigContext); + const integrationConfig = useMemo(() => config.integrations[integrationType!], [integrationType, config]); + const setIntegrationConfig = useCallback((newIntegrationConfig: Partial) => { + setConfig((prev) => { + return { + ...prev, + integrations: { + ...prev.integrations, + [integrationType!]: + { ...prev.integrations[integrationType!], ...newIntegrationConfig }, + }, + }; + }); + }, [integrationType, setConfig]); + return ( +
+ + + )}> + { setIntegrationConfig({ urlRegexes: newRegexes }); }}> + + + + +
+ + ); }; \ No newline at end of file