upd: login ios
This commit is contained in:
@@ -55,9 +55,11 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
|
||||
const hasil = await decryptToken(String(token))
|
||||
const permission = await requestPermission()
|
||||
if (permission) {
|
||||
const tokenDevice = await getToken()
|
||||
try {
|
||||
if (Platform.OS === 'android') {
|
||||
const tokenDevice = await getToken()
|
||||
const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
@@ -77,7 +79,7 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
|
||||
try {
|
||||
const hasil = await decryptToken(String(tokenRef.current))
|
||||
const token = await getToken()
|
||||
if (Platform.OS === 'android'){
|
||||
if (Platform.OS === 'android') {
|
||||
const response = await apiUnregisteredToken({ user: hasil, token: String(token) })
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user