Fix:
- profile/[id]/edit.tsx: api upload
- profile/[id]/update-photo.tsx: api upload
- service/api-client/api-profile.ts: api profile bisa memilih kategori

Component
Add:
- components/Image/AvatarComp.tsx

### No Issue
This commit is contained in:
2025-08-27 12:16:31 +08:00
parent 7cddc7abe3
commit 2227aaa99f
9 changed files with 106 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
import { AvatarCustom, ClickableCustom } from "@/components";
import { AvatarComp, ClickableCustom } from "@/components";
import { AccentColor } from "@/constants/color-palet";
import DUMMY_IMAGE from "@/constants/dummy-image-value";
import { router } from "expo-router";
@@ -12,38 +12,30 @@ const AvatarAndBackground = ({
imageId: string;
}) => {
return (
// console.log("backgroundId", backgroundId),
// console.log("imageId", imageId),
<View style={styles.container}>
{/* Background Image */}
<ClickableCustom
onPress={() => {
router.navigate(
`/(application)/(image)/preview-image/${backgroundId}`
);
}}
>
<ImageBackground
source={DUMMY_IMAGE.background}
style={styles.backgroundImage}
resizeMode="cover"
/>
</ClickableCustom>
{/* Avatar yang sedikit keluar */}
<View style={styles.avatarOverlap}>
console.log("backgroundId", backgroundId),
(
<View style={styles.container}>
{/* Background Image */}
<ClickableCustom
onPress={() => {
router.navigate(
`/(application)/(image)/preview-image/${imageId}`
`/(application)/(image)/preview-image/${backgroundId}`
);
}}
>
<AvatarCustom source={DUMMY_IMAGE.avatar} size="lg" />
<ImageBackground
source={DUMMY_IMAGE.background}
style={styles.backgroundImage}
resizeMode="cover"
/>
</ClickableCustom>
{/* Avatar yang sedikit keluar */}
<View style={styles.avatarOverlap}>
<AvatarComp size="lg" fileId={imageId} />
</View>
</View>
</View>
)
);
};