fix: edit profile

Deskripsi:
- update keyboard avoiding pada edit profile

No Issues
This commit is contained in:
2025-09-24 16:19:33 +08:00
parent 6cca0a3d08
commit 93c492ac71

View File

@@ -10,11 +10,14 @@ import { apiEditProfile, apiGetProfile } from "@/lib/api";
import { setEntities } from "@/lib/entitiesSlice";
import { useAuthSession } from "@/providers/AuthProvider";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import { useHeaderHeight } from "@react-navigation/elements";
import * as ImagePicker from "expo-image-picker";
import { router, Stack } from "expo-router";
import { useEffect, useState } from "react";
import {
Image,
KeyboardAvoidingView,
Platform,
Pressable,
SafeAreaView,
ScrollView,
@@ -37,6 +40,7 @@ type Props = {
};
export default function EditProfile() {
const headerHeight = useHeaderHeight()
const dispatch = useDispatch()
const entities = useSelector((state: any) => state.entities)
const { token, decryptToken } = useAuthSession()
@@ -231,7 +235,12 @@ export default function EditProfile() {
),
}}
/>
<ScrollView style={[Styles.h100]}>
<KeyboardAvoidingView
style={[Styles.h100]}
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={headerHeight}
>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={[Styles.p15]}>
<View style={{ justifyContent: "center", alignItems: "center" }}>
{
@@ -341,6 +350,7 @@ export default function EditProfile() {
/>
</View>
</ScrollView>
</KeyboardAvoidingView>
<ModalSelect
category={valSelect}