Add:
- hooks/
- ios.build.device : untuk mendownload di ios

Fix:
- service/api.t : mengatur api
- context/AuthContext.tsx: Provider untuk access token

### No Issue
This commit is contained in:
2025-08-21 15:22:14 +08:00
parent 7a7bfd3ab9
commit 21c6460220
12 changed files with 380 additions and 142 deletions

View File

@@ -1,3 +1,4 @@
import { AlertDefaultSystem } from "@/components";
import { IMenuDrawerItem } from "@/components/_Interface/types";
import MenuDrawerDynamicGrid from "@/components/Drawer/MenuDrawerDynamicGird";
import { router } from "expo-router";
@@ -6,15 +7,28 @@ export default function Profile_MenuDrawerSection({
drawerItems,
setShowLogoutAlert,
setIsDrawerOpen,
logout,
}: {
drawerItems: IMenuDrawerItem[];
setShowLogoutAlert: (value: boolean) => void;
setIsDrawerOpen: (value: boolean) => void;
logout: () => Promise<void>;
}) {
const handlePress = (item: IMenuDrawerItem) => {
if (item.label === "Keluar") {
// console.log("Logout clicked");
setShowLogoutAlert(true);
// setShowLogoutAlert(true);
AlertDefaultSystem({
title: "Apakah anda yakin ingin keluar?",
message: "Anda akan keluar dari akun ini",
textLeft: "Batal",
textRight: "Keluar",
onPressRight: () => {
logout();
setIsDrawerOpen(false);
},
onPressLeft: () => setIsDrawerOpen(false),
});
} else {
console.log("PATH >> ", item.path);
router.push(item.path as any);