upd: edit profile

Deskripsi:
- ketinggalan

No Issues'
'
This commit is contained in:
amel
2025-06-16 17:15:36 +08:00
parent c5f0a9e3a1
commit 9728e2ea23
2 changed files with 355 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import Styles from "@/constants/Styles";
import { apiGetProfile } from "@/lib/api";
import { setEntities } from "@/lib/entitiesSlice";
import { useAuthSession } from "@/providers/AuthProvider";
import { AntDesign, Octicons } from "@expo/vector-icons";
import { AntDesign } from "@expo/vector-icons";
import { router, Stack } from "expo-router";
import { useEffect, useState } from "react";
import { Image, SafeAreaView, ScrollView, Text, View } from "react-native";
@@ -26,7 +26,6 @@ export default function Profile() {
async function handleUserLogin() {
const hasil = await decryptToken(String(token?.current))
apiGetProfile({ id: hasil }).then((data) => dispatch(setEntities(data.data)));
setRole(entities.idUserRole)
}
@@ -66,7 +65,7 @@ export default function Profile() {
<View style={[Styles.rowSpaceBetween]}>
<Text style={[Styles.textDefaultSemiBold]}>Informasi</Text>
{
role != "developer" && <Text style={[Styles.textLink]}>Edit</Text>
entities.idUserRole != "developer" && <Text onPress={() => { router.push('/edit-profile') }} style={[Styles.textLink]}>Edit</Text>
}
</View>
<ItemDetailMember category="nik" value={entities.nik} />