From 396124e8c28f2a712d8dfbcc6038cf43b93ba525 Mon Sep 17 00:00:00 2001 From: Edgar Khanzadian Date: Thu, 24 Oct 2024 14:16:47 +0400 Subject: [PATCH] feat: lock app button --- apps/mobile/src/app/(home)/settings/index.tsx | 4 +++- .../splash-screen-guard/splash-screen-guard.tsx | 5 +++-- .../splash-screen-guard/use-auth-context.ts | 11 +++++++++++ .../{use-auth-state.ts => use-auth-state.tsx} | 16 ++++++++++++++-- 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 apps/mobile/src/components/splash-screen-guard/use-auth-context.ts rename apps/mobile/src/components/splash-screen-guard/{use-auth-state.ts => use-auth-state.tsx} (83%) diff --git a/apps/mobile/src/app/(home)/settings/index.tsx b/apps/mobile/src/app/(home)/settings/index.tsx index 7976c0f23..0cc3fb075 100644 --- a/apps/mobile/src/app/(home)/settings/index.tsx +++ b/apps/mobile/src/app/(home)/settings/index.tsx @@ -4,6 +4,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Divider } from '@/components/divider'; import { NotifyUserSheet } from '@/components/sheets/notify-user-sheet.layout'; +import { useAuthContext } from '@/components/splash-screen-guard/use-auth-context'; import { AppRoutes } from '@/routes'; import { TestId } from '@/shared/test-id'; import { t } from '@lingui/macro'; @@ -35,6 +36,7 @@ export default function SettingsScreen() { const feesSheetRef = useRef(null); const theme = useTheme(); const router = useRouter(); + const { lockApp } = useAuthContext(); return ( <> @@ -204,7 +206,7 @@ export default function SettingsScreen() {