upd: modal img

Deskripsi:
- view foto profile
- view foto detail member
- view image banner

No Issues
This commit is contained in:
2026-01-23 17:18:08 +08:00
parent b99476a593
commit 013589b9f7
8 changed files with 66 additions and 17 deletions

View File

@@ -6,17 +6,19 @@ type Props = {
src: string,
size?: 'sm' | 'xs' | 'lg'
border?: boolean
onError?: (val:boolean) => void
}
export default function ImageUser({ src, size }: Props) {
export default function ImageUser({ src, size, onError }: Props) {
const [error, setError] = useState(false)
return (
<Image
source={error ? require('../assets/images/user.jpg') : { uri: src }}
style={[size == 'xs' ? Styles.userProfileExtraSmall : size == 'lg' ? Styles.userProfileBig : Styles.userProfileSmall, Styles.borderAll]}
onError={() =>
onError={() => {
setError(true)
}
onError?.(true)
}}
/>
)
}