thêm chức năng Sos và thêm glustack-ui

This commit is contained in:
Tran Anh Tuan
2025-11-04 16:24:54 +07:00
parent e535aaa1e8
commit 2137925ba9
33 changed files with 5533 additions and 171 deletions

View File

@@ -1,3 +1,5 @@
import { TOKEN } from "@/constants";
import { removeStorageItem } from "@/utils/storage";
import { Router } from "expo-router";
let routerInstance: Router | null = null;
@@ -14,6 +16,7 @@ export const setRouterInstance = (router: Router) => {
*/
export const handle401 = () => {
if (routerInstance) {
removeStorageItem(TOKEN);
(routerInstance as any).replace("/login");
} else {
console.warn("Router instance not set, cannot redirect to login");