diff --git a/android/nativebrik/src/main/java/com/nativebrik/sdk/component/renderer/block.kt b/android/nativebrik/src/main/java/com/nativebrik/sdk/component/renderer/block.kt index a83476c..f3a621c 100644 --- a/android/nativebrik/src/main/java/com/nativebrik/sdk/component/renderer/block.kt +++ b/android/nativebrik/src/main/java/com/nativebrik/sdk/component/renderer/block.kt @@ -2,6 +2,7 @@ package com.nativebrik.sdk.component.renderer import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import com.nativebrik.sdk.schema.CollectionKind import com.nativebrik.sdk.schema.UIBlock @Composable @@ -14,6 +15,14 @@ internal fun Block(block: UIBlock, modifier: Modifier = Modifier) { } is UIBlock.UnionUIImageBlock -> Image(block = block.data, modifier) is UIBlock.UnionUITextBlock -> Text(block = block.data, modifier) + is UIBlock.UnionUICollectionBlock -> { + val collection = block.data + when (collection.data?.kind) { + CollectionKind.CAROUSEL -> Carousel(block = collection, modifier) + CollectionKind.GRID -> Grid(block = collection, modifier) + else -> Grid(block = collection, modifier) + } + } else -> Unit } }