check if image url is null

This commit is contained in:
Satindar Dhillon
2022-09-02 14:01:58 -07:00
parent a0b56f43a1
commit f1eedbf03d

View File

@ -61,14 +61,16 @@ fun LinkedItemCard(item: LinkedItem, onClickHandler: () -> Unit) {
}
}
Image(
painter = rememberAsyncImagePainter(item.imageURLString),
contentDescription = "Image associated with linked item",
modifier = Modifier
.padding(top = 6.dp)
.clip(RoundedCornerShape(6.dp))
.size(80.dp)
)
if (item.imageURLString != null) {
Image(
painter = rememberAsyncImagePainter(item.imageURLString),
contentDescription = "Image associated with linked item",
modifier = Modifier
.padding(top = 6.dp)
.clip(RoundedCornerShape(6.dp))
.size(80.dp)
)
}
}
Divider(color = MaterialTheme.colorScheme.outlineVariant, thickness = 1.dp)