Try to notification
### Issue: package import * as Notifications from expo-notifications;
This commit is contained in:
6
bun.lock
6
bun.lock
@@ -19,9 +19,9 @@
|
|||||||
"expo": "^54.0.0",
|
"expo": "^54.0.0",
|
||||||
"expo-camera": "~17.0.7",
|
"expo-camera": "~17.0.7",
|
||||||
"expo-clipboard": "~8.0.7",
|
"expo-clipboard": "~8.0.7",
|
||||||
"expo-constants": "~18.0.10",
|
"expo-constants": "^18.0.10",
|
||||||
"expo-dev-client": "~6.0.12",
|
"expo-dev-client": "~6.0.12",
|
||||||
"expo-device": "~8.0.9",
|
"expo-device": "^8.0.9",
|
||||||
"expo-document-picker": "~14.0.7",
|
"expo-document-picker": "~14.0.7",
|
||||||
"expo-file-system": "^19.0.15",
|
"expo-file-system": "^19.0.15",
|
||||||
"expo-font": "~14.0.8",
|
"expo-font": "~14.0.8",
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"expo-image": "~3.0.8",
|
"expo-image": "~3.0.8",
|
||||||
"expo-image-picker": "~17.0.8",
|
"expo-image-picker": "~17.0.8",
|
||||||
"expo-linking": "~8.0.8",
|
"expo-linking": "~8.0.8",
|
||||||
"expo-notifications": "~0.32.13",
|
"expo-notifications": "^0.32.13",
|
||||||
"expo-router": "~6.0.1",
|
"expo-router": "~6.0.1",
|
||||||
"expo-splash-screen": "~31.0.9",
|
"expo-splash-screen": "~31.0.9",
|
||||||
"expo-status-bar": "~3.0.8",
|
"expo-status-bar": "~3.0.8",
|
||||||
|
|||||||
@@ -294,8 +294,11 @@
|
|||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-HIPMIBadungConnect/Pods-HIPMIBadungConnect-resources.sh",
|
"${PODS_ROOT}/Target Support Files/Pods-HIPMIBadungConnect/Pods-HIPMIBadungConnect-resources.sh",
|
||||||
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication/ExpoApplication_privacy.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
|
||||||
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXNotifications/ExpoNotifications_privacy.bundle",
|
||||||
|
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoDevice/ExpoDevice_privacy.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoSystemUI/ExpoSystemUI_privacy.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoSystemUI/ExpoSystemUI_privacy.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage/RNCAsyncStorage_resources.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage/RNCAsyncStorage_resources.bundle",
|
||||||
@@ -328,8 +331,11 @@
|
|||||||
);
|
);
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoApplication_privacy.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
|
||||||
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoNotifications_privacy.bundle",
|
||||||
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoDevice_privacy.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoSystemUI_privacy.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoSystemUI_privacy.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCAsyncStorage_resources.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCAsyncStorage_resources.bundle",
|
||||||
|
|||||||
@@ -4,6 +4,16 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>NSPrivacyAccessedAPITypes</key>
|
<key>NSPrivacyAccessedAPITypes</key>
|
||||||
<array>
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>C617.1</string>
|
||||||
|
<string>0A2A.1</string>
|
||||||
|
<string>3B52.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||||
@@ -14,12 +24,10 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
||||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
<array>
|
<array>
|
||||||
<string>0A2A.1</string>
|
<string>35F9.1</string>
|
||||||
<string>3B52.1</string>
|
|
||||||
<string>C617.1</string>
|
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
@@ -31,14 +39,6 @@
|
|||||||
<string>85F4.1</string>
|
<string>85F4.1</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
|
||||||
<key>NSPrivacyAccessedAPIType</key>
|
|
||||||
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
|
||||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
||||||
<array>
|
|
||||||
<string>35F9.1</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
</array>
|
||||||
<key>NSPrivacyCollectedDataTypes</key>
|
<key>NSPrivacyCollectedDataTypes</key>
|
||||||
<array/>
|
<array/>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- EXConstants (18.0.8):
|
- EXApplication (7.0.7):
|
||||||
|
- ExpoModulesCore
|
||||||
|
- EXConstants (18.0.10):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
- EXImageLoader (6.0.0):
|
- EXImageLoader (6.0.0):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
@@ -7,6 +9,8 @@ PODS:
|
|||||||
- EXJSONUtils (0.15.0)
|
- EXJSONUtils (0.15.0)
|
||||||
- EXManifests (1.0.8):
|
- EXManifests (1.0.8):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
|
- EXNotifications (0.32.13):
|
||||||
|
- ExpoModulesCore
|
||||||
- Expo (54.0.2):
|
- Expo (54.0.2):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
- hermes-engine
|
- hermes-engine
|
||||||
@@ -211,6 +215,8 @@ PODS:
|
|||||||
- ZXingObjC/PDF417
|
- ZXingObjC/PDF417
|
||||||
- ExpoClipboard (8.0.7):
|
- ExpoClipboard (8.0.7):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
|
- ExpoDevice (8.0.9):
|
||||||
|
- ExpoModulesCore
|
||||||
- ExpoDocumentPicker (14.0.7):
|
- ExpoDocumentPicker (14.0.7):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
- ExpoFileSystem (19.0.15):
|
- ExpoFileSystem (19.0.15):
|
||||||
@@ -264,7 +270,7 @@ PODS:
|
|||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
- ExpoSystemUI (6.0.7):
|
- ExpoSystemUI (6.0.7):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
- ExpoWebBrowser (15.0.7):
|
- ExpoWebBrowser (15.0.9):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
- EXUpdatesInterface (2.0.0):
|
- EXUpdatesInterface (2.0.0):
|
||||||
- ExpoModulesCore
|
- ExpoModulesCore
|
||||||
@@ -2422,10 +2428,12 @@ PODS:
|
|||||||
- ZXingObjC/Core
|
- ZXingObjC/Core
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
- EXApplication (from `../node_modules/expo-application/ios`)
|
||||||
- EXConstants (from `../node_modules/expo-constants/ios`)
|
- EXConstants (from `../node_modules/expo-constants/ios`)
|
||||||
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
|
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
|
||||||
- EXJSONUtils (from `../node_modules/expo-json-utils/ios`)
|
- EXJSONUtils (from `../node_modules/expo-json-utils/ios`)
|
||||||
- EXManifests (from `../node_modules/expo-manifests/ios`)
|
- EXManifests (from `../node_modules/expo-manifests/ios`)
|
||||||
|
- EXNotifications (from `../node_modules/expo-notifications/ios`)
|
||||||
- Expo (from `../node_modules/expo`)
|
- Expo (from `../node_modules/expo`)
|
||||||
- expo-dev-client (from `../node_modules/expo-dev-client/ios`)
|
- expo-dev-client (from `../node_modules/expo-dev-client/ios`)
|
||||||
- expo-dev-launcher (from `../node_modules/expo-dev-launcher`)
|
- expo-dev-launcher (from `../node_modules/expo-dev-launcher`)
|
||||||
@@ -2434,6 +2442,7 @@ DEPENDENCIES:
|
|||||||
- ExpoAsset (from `../node_modules/expo-asset/ios`)
|
- ExpoAsset (from `../node_modules/expo-asset/ios`)
|
||||||
- ExpoCamera (from `../node_modules/expo-camera/ios`)
|
- ExpoCamera (from `../node_modules/expo-camera/ios`)
|
||||||
- ExpoClipboard (from `../node_modules/expo-clipboard/ios`)
|
- ExpoClipboard (from `../node_modules/expo-clipboard/ios`)
|
||||||
|
- ExpoDevice (from `../node_modules/expo-device/ios`)
|
||||||
- ExpoDocumentPicker (from `../node_modules/expo-document-picker/ios`)
|
- ExpoDocumentPicker (from `../node_modules/expo-document-picker/ios`)
|
||||||
- ExpoFileSystem (from `../node_modules/expo-file-system/ios`)
|
- ExpoFileSystem (from `../node_modules/expo-file-system/ios`)
|
||||||
- ExpoFont (from `../node_modules/expo-font/ios`)
|
- ExpoFont (from `../node_modules/expo-font/ios`)
|
||||||
@@ -2543,6 +2552,8 @@ SPEC REPOS:
|
|||||||
- ZXingObjC
|
- ZXingObjC
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
EXApplication:
|
||||||
|
:path: "../node_modules/expo-application/ios"
|
||||||
EXConstants:
|
EXConstants:
|
||||||
:path: "../node_modules/expo-constants/ios"
|
:path: "../node_modules/expo-constants/ios"
|
||||||
EXImageLoader:
|
EXImageLoader:
|
||||||
@@ -2551,6 +2562,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/expo-json-utils/ios"
|
:path: "../node_modules/expo-json-utils/ios"
|
||||||
EXManifests:
|
EXManifests:
|
||||||
:path: "../node_modules/expo-manifests/ios"
|
:path: "../node_modules/expo-manifests/ios"
|
||||||
|
EXNotifications:
|
||||||
|
:path: "../node_modules/expo-notifications/ios"
|
||||||
Expo:
|
Expo:
|
||||||
:path: "../node_modules/expo"
|
:path: "../node_modules/expo"
|
||||||
expo-dev-client:
|
expo-dev-client:
|
||||||
@@ -2567,6 +2580,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/expo-camera/ios"
|
:path: "../node_modules/expo-camera/ios"
|
||||||
ExpoClipboard:
|
ExpoClipboard:
|
||||||
:path: "../node_modules/expo-clipboard/ios"
|
:path: "../node_modules/expo-clipboard/ios"
|
||||||
|
ExpoDevice:
|
||||||
|
:path: "../node_modules/expo-device/ios"
|
||||||
ExpoDocumentPicker:
|
ExpoDocumentPicker:
|
||||||
:path: "../node_modules/expo-document-picker/ios"
|
:path: "../node_modules/expo-document-picker/ios"
|
||||||
ExpoFileSystem:
|
ExpoFileSystem:
|
||||||
@@ -2760,10 +2775,12 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/ReactCommon/yoga"
|
:path: "../node_modules/react-native/ReactCommon/yoga"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
EXConstants: 7e4654405af367ff908c863fe77a8a22d60bd37d
|
EXApplication: 296622817d459f46b6c5fe8691f4aac44d2b79e7
|
||||||
|
EXConstants: fd688cef4e401dcf798a021cfb5d87c890c30ba3
|
||||||
EXImageLoader: 189e3476581efe3ad4d1d3fb4735b7179eb26f05
|
EXImageLoader: 189e3476581efe3ad4d1d3fb4735b7179eb26f05
|
||||||
EXJSONUtils: 1d3e4590438c3ee593684186007028a14b3686cd
|
EXJSONUtils: 1d3e4590438c3ee593684186007028a14b3686cd
|
||||||
EXManifests: 224345a575fca389073c416297b6348163f28d1a
|
EXManifests: 224345a575fca389073c416297b6348163f28d1a
|
||||||
|
EXNotifications: a62e1f8e3edd258dc3b155d3caa49f32920f1c6c
|
||||||
Expo: 9e6ddfbc1f5aefde22029899293c701f1d34c2b1
|
Expo: 9e6ddfbc1f5aefde22029899293c701f1d34c2b1
|
||||||
expo-dev-client: f3434d6ca09ecb14ae48c2a3912bdbb07464cc85
|
expo-dev-client: f3434d6ca09ecb14ae48c2a3912bdbb07464cc85
|
||||||
expo-dev-launcher: b9538b1e0dc3fd2ddad75017b6ee9c8dfb206925
|
expo-dev-launcher: b9538b1e0dc3fd2ddad75017b6ee9c8dfb206925
|
||||||
@@ -2772,6 +2789,7 @@ SPEC CHECKSUMS:
|
|||||||
ExpoAsset: 84810d6fed8179f04d4a7a4a6b37028bbd726e26
|
ExpoAsset: 84810d6fed8179f04d4a7a4a6b37028bbd726e26
|
||||||
ExpoCamera: ae1d6691b05b753261a845536d2b19a9788a8750
|
ExpoCamera: ae1d6691b05b753261a845536d2b19a9788a8750
|
||||||
ExpoClipboard: af650d14765f19c60ce2a1eaf9dfe6445eff7365
|
ExpoClipboard: af650d14765f19c60ce2a1eaf9dfe6445eff7365
|
||||||
|
ExpoDevice: 148accb4071873d19fba80a2506c58ffa433d620
|
||||||
ExpoDocumentPicker: 2200eefc2817f19315fa18f0147e0b80ece86926
|
ExpoDocumentPicker: 2200eefc2817f19315fa18f0147e0b80ece86926
|
||||||
ExpoFileSystem: 5fb091ea11198e109ceef2bdef2e6e66523e62c4
|
ExpoFileSystem: 5fb091ea11198e109ceef2bdef2e6e66523e62c4
|
||||||
ExpoFont: 86ceec09ffed1c99cfee36ceb79ba149074901b5
|
ExpoFont: 86ceec09ffed1c99cfee36ceb79ba149074901b5
|
||||||
@@ -2785,7 +2803,7 @@ SPEC CHECKSUMS:
|
|||||||
ExpoSplashScreen: 0634b705953e6934a5156397162eefc1ee5d6a7c
|
ExpoSplashScreen: 0634b705953e6934a5156397162eefc1ee5d6a7c
|
||||||
ExpoSymbols: 1ae04ce686de719b9720453b988d8bc5bf776c68
|
ExpoSymbols: 1ae04ce686de719b9720453b988d8bc5bf776c68
|
||||||
ExpoSystemUI: 6cd74248a2282adf6dec488a75fa532d69dee314
|
ExpoSystemUI: 6cd74248a2282adf6dec488a75fa532d69dee314
|
||||||
ExpoWebBrowser: 533bc2a1b188eec1c10e4926decf658f1687b5e5
|
ExpoWebBrowser: b973e1351fdcf5fec0c400997b1851f5a8219ec3
|
||||||
EXUpdatesInterface: 5adf50cb41e079c861da6d9b4b954c3db9a50734
|
EXUpdatesInterface: 5adf50cb41e079c861da6d9b4b954c3db9a50734
|
||||||
FBLazyVector: 9e0cd874afd81d9a4d36679daca991b58b260d42
|
FBLazyVector: 9e0cd874afd81d9a4d36679daca991b58b260d42
|
||||||
hermes-engine: 35c763d57c9832d0eef764316ca1c4d043581394
|
hermes-engine: 35c763d57c9832d0eef764316ca1c4d043581394
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
"expo": "^54.0.0",
|
"expo": "^54.0.0",
|
||||||
"expo-camera": "~17.0.7",
|
"expo-camera": "~17.0.7",
|
||||||
"expo-clipboard": "~8.0.7",
|
"expo-clipboard": "~8.0.7",
|
||||||
"expo-constants": "~18.0.10",
|
"expo-constants": "^18.0.10",
|
||||||
"expo-dev-client": "~6.0.12",
|
"expo-dev-client": "~6.0.12",
|
||||||
"expo-device": "~8.0.9",
|
"expo-device": "^8.0.9",
|
||||||
"expo-document-picker": "~14.0.7",
|
"expo-document-picker": "~14.0.7",
|
||||||
"expo-file-system": "^19.0.15",
|
"expo-file-system": "^19.0.15",
|
||||||
"expo-font": "~14.0.8",
|
"expo-font": "~14.0.8",
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"expo-image": "~3.0.8",
|
"expo-image": "~3.0.8",
|
||||||
"expo-image-picker": "~17.0.8",
|
"expo-image-picker": "~17.0.8",
|
||||||
"expo-linking": "~8.0.8",
|
"expo-linking": "~8.0.8",
|
||||||
"expo-notifications": "~0.32.13",
|
"expo-notifications": "^0.32.13",
|
||||||
"expo-router": "~6.0.1",
|
"expo-router": "~6.0.1",
|
||||||
"expo-splash-screen": "~31.0.9",
|
"expo-splash-screen": "~31.0.9",
|
||||||
"expo-status-bar": "~3.0.8",
|
"expo-status-bar": "~3.0.8",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { MainColor } from "@/constants/color-palet";
|
|||||||
import { useAuth } from "@/hooks/use-auth";
|
import { useAuth } from "@/hooks/use-auth";
|
||||||
import { apiCheckCodeOtp } from "@/service/api-config";
|
import { apiCheckCodeOtp } from "@/service/api-config";
|
||||||
import { GStyles } from "@/styles/global-styles";
|
import { GStyles } from "@/styles/global-styles";
|
||||||
|
import { registerForPushNotificationsAsync } from "@/utils/notifications";
|
||||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
@@ -28,7 +29,7 @@ export default function VerificationView() {
|
|||||||
nomor === "6282340374412";
|
nomor === "6282340374412";
|
||||||
|
|
||||||
// --- Context ---
|
// --- Context ---
|
||||||
const { validateOtp, isLoading } = useAuth();
|
const { validateOtp, isLoading, loginWithNomor } = useAuth();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setUserNumber(nomor?.replace(/^\+/, "") || "");
|
setUserNumber(nomor?.replace(/^\+/, "") || "");
|
||||||
@@ -70,6 +71,9 @@ export default function VerificationView() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
await loginWithNomor(nomor as string);
|
||||||
|
setRecodeOtp(true);
|
||||||
|
|
||||||
// ❌ Kamu tidak punya nomor di sini, jadi pastikan `nomor` tersedia
|
// ❌ Kamu tidak punya nomor di sini, jadi pastikan `nomor` tersedia
|
||||||
// Sebaiknya simpan nomor saat login, atau gunakan dari `useLocalSearchParams`
|
// Sebaiknya simpan nomor saat login, atau gunakan dari `useLocalSearchParams`
|
||||||
router.setParams({ nomor }); // opsional
|
router.setParams({ nomor }); // opsional
|
||||||
@@ -100,6 +104,14 @@ export default function VerificationView() {
|
|||||||
// 🔁 VERIFIKASI NORMAL (untuk pengguna sungguhan)
|
// 🔁 VERIFIKASI NORMAL (untuk pengguna sungguhan)
|
||||||
try {
|
try {
|
||||||
const response = await validateOtp(nomor as string);
|
const response = await validateOtp(nomor as string);
|
||||||
|
// registerForPushNotificationsAsync().then((token) => {
|
||||||
|
// if (token) {
|
||||||
|
// console.log("Expo Push Token:", token);
|
||||||
|
// // TODO: Kirim token ke backend kamu
|
||||||
|
// } else {
|
||||||
|
// console.log("Failed to get Expo Push Token");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
router.replace(response);
|
router.replace(response);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error verification", error);
|
console.log("Error verification", error);
|
||||||
|
|||||||
@@ -4,17 +4,27 @@ import Constants from 'expo-constants';
|
|||||||
import * as Device from 'expo-device';
|
import * as Device from 'expo-device';
|
||||||
|
|
||||||
|
|
||||||
|
// Notifications.setNotificationHandler({
|
||||||
|
// handleNotification: async () => ({
|
||||||
|
// shouldShowAlert: true,
|
||||||
|
// shouldPlaySound: true,
|
||||||
|
// shouldSetBadge: false,
|
||||||
|
// shouldShowBanner: true,
|
||||||
|
// shouldShowList: true,
|
||||||
|
// }),
|
||||||
|
// });
|
||||||
|
|
||||||
Notifications.setNotificationHandler({
|
Notifications.setNotificationHandler({
|
||||||
handleNotification: async () => ({
|
handleNotification: async () => ({
|
||||||
shouldShowAlert: true,
|
shouldPlaySound: false,
|
||||||
shouldPlaySound: true,
|
|
||||||
shouldSetBadge: false,
|
shouldSetBadge: false,
|
||||||
shouldShowBanner: true,
|
shouldShowBanner: true,
|
||||||
shouldShowList: true,
|
shouldShowList: true,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default async function registerForPushNotificationsAsync() {
|
|
||||||
|
export async function registerForPushNotificationsAsync() {
|
||||||
if (!Device.isDevice) {
|
if (!Device.isDevice) {
|
||||||
console.warn("Push notifications don't work on simulator");
|
console.warn("Push notifications don't work on simulator");
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user