fix: variable yg tidak terpakai
This commit is contained in:
@@ -108,7 +108,7 @@ export default function RootLayout() {
|
|||||||
try {
|
try {
|
||||||
if (title != "Komentar Baru") {
|
if (title != "Komentar Baru") {
|
||||||
const hasil = await decryptToken(String(token?.current))
|
const hasil = await decryptToken(String(token?.current))
|
||||||
const response = await apiReadOneNotification({ user: hasil, id: id })
|
await apiReadOneNotification({ user: hasil, id: id })
|
||||||
}
|
}
|
||||||
pushToPage(category, idContent)
|
pushToPage(category, idContent)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const register = await apiRegisteredToken({ user: hasil, token: "" })
|
await apiRegisteredToken({ user: hasil, token: "" })
|
||||||
await AsyncStorage.setItem('@token', token);
|
await AsyncStorage.setItem('@token', token);
|
||||||
tokenRef.current = token;
|
tokenRef.current = token;
|
||||||
router.replace('/home')
|
router.replace('/home')
|
||||||
@@ -78,7 +78,7 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
|
|||||||
const hasil = await decryptToken(String(tokenRef.current))
|
const hasil = await decryptToken(String(tokenRef.current))
|
||||||
// if (Platform.OS === 'android') {
|
// if (Platform.OS === 'android') {
|
||||||
const token = await getToken()
|
const token = await getToken()
|
||||||
const response = await apiUnregisteredToken({ user: hasil, token: String(token) })
|
await apiUnregisteredToken({ user: hasil, token: String(token) })
|
||||||
// }else{
|
// }else{
|
||||||
// const response = await apiUnregisteredToken({ user: hasil, token: "" })
|
// const response = await apiUnregisteredToken({ user: hasil, token: "" })
|
||||||
// }
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user