thêm quét QR đăng nhập, sửa lại logic để gọi api bằng ip thiết bị
This commit is contained in:
@@ -4,7 +4,7 @@ import { StyleSheet } from "react-native";
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { ThemedView } from "@/components/themed-view";
|
||||
import { api } from "@/config";
|
||||
import { TOKEN } from "@/constants";
|
||||
import { DOMAIN, TOKEN } from "@/constants";
|
||||
import { removeStorageItem } from "@/utils/storage";
|
||||
import { useState } from "react";
|
||||
|
||||
@@ -37,9 +37,10 @@ export default function SettingScreen() {
|
||||
<ThemedText type="title">Settings</ThemedText>
|
||||
<ThemedView
|
||||
style={styles.button}
|
||||
onTouchEnd={() => {
|
||||
removeStorageItem(TOKEN);
|
||||
router.replace("/auth/login");
|
||||
onTouchEnd={async () => {
|
||||
await removeStorageItem(TOKEN);
|
||||
await removeStorageItem(DOMAIN);
|
||||
router.navigate("/auth/login");
|
||||
}}
|
||||
>
|
||||
<ThemedText type="defaultSemiBold">Đăng xuất</ThemedText>
|
||||
|
||||
Reference in New Issue
Block a user