From 57154101bd7b887628b049a2f57eb123f735a6ef Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Mon, 2 May 2022 23:06:37 -0300 Subject: [PATCH] Chore: Evaluate SecurityPrivacyView - TypeScript (#4092) --- app/views/SecurityPrivacyView.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/SecurityPrivacyView.tsx b/app/views/SecurityPrivacyView.tsx index b62d1ad09..f632ce55d 100644 --- a/app/views/SecurityPrivacyView.tsx +++ b/app/views/SecurityPrivacyView.tsx @@ -17,22 +17,24 @@ import { } from '../utils/log'; import SafeAreaView from '../containers/SafeAreaView'; import { ANALYTICS_EVENTS_KEY, CRASH_REPORT_KEY, isFDroidBuild, SWITCH_TRACK_COLOR } from '../lib/constants'; +import { SettingsStackParamList } from '../stacks/types'; +import { IApplicationState } from '../definitions'; interface ISecurityPrivacyViewProps { - navigation: StackNavigationProp; + navigation: StackNavigationProp; } const SecurityPrivacyView = ({ navigation }: ISecurityPrivacyViewProps): JSX.Element => { const [crashReportState, setCrashReportState] = useState(getReportCrashErrorsValue()); const [analyticsEventsState, setAnalyticsEventsState] = useState(getReportAnalyticsEventsValue()); - const e2eEnabled = useSelector((state: any) => state.settings.E2E_Enable); + const e2eEnabled = useSelector((state: IApplicationState) => state.settings.E2E_Enable); useEffect(() => { navigation.setOptions({ title: I18n.t('Security_and_privacy') }); - }, []); + }, [navigation]); const toggleCrashReport = (value: boolean) => { logEvent(events.SP_TOGGLE_CRASH_REPORT);