Add:
- Api background profile

Asset
Add:
- assets/images/loading.gif: untuk loading

### No Issue
This commit is contained in:
2025-08-27 14:38:37 +08:00
parent 2227aaa99f
commit 4fc2c90702
9 changed files with 134 additions and 45 deletions

View File

@@ -1,4 +1,5 @@
import { AvatarComp, ClickableCustom } from "@/components";
import API_STRORAGE from "@/constants/base-url-api-strorage";
import { AccentColor } from "@/constants/color-palet";
import DUMMY_IMAGE from "@/constants/dummy-image-value";
import { router } from "expo-router";
@@ -12,30 +13,31 @@ const AvatarAndBackground = ({
imageId: string;
}) => {
return (
console.log("backgroundId", backgroundId),
(
<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>
<View style={styles.container}>
{/* Background Image */}
<ClickableCustom
onPress={() => {
router.navigate(
`/(application)/(image)/preview-image/${backgroundId}`
);
}}
>
<ImageBackground
source={
backgroundId
? { uri: API_STRORAGE.GET({ fileId: backgroundId }) }
: DUMMY_IMAGE.background
}
style={styles.backgroundImage}
resizeMode="cover"
/>
</ClickableCustom>
{/* Avatar yang sedikit keluar */}
<View style={styles.avatarOverlap}>
<AvatarComp size="lg" fileId={imageId} />
</View>
{/* Avatar yang sedikit keluar */}
<View style={styles.avatarOverlap}>
<AvatarComp size="lg" fileId={imageId} />
</View>
)
</View>
);
};