fix: bug
This commit is contained in:
@@ -14,6 +14,7 @@ interface TemplateListProps {
|
||||
onRefresh?: () => void;
|
||||
onLoadMore?: () => void;
|
||||
onTemplatePress?: (template: Template) => void;
|
||||
onVideoChange?: (template: Template, index: number) => void;
|
||||
error?: string | null;
|
||||
}
|
||||
|
||||
@@ -26,6 +27,7 @@ export function TemplateList({
|
||||
onRefresh,
|
||||
onLoadMore,
|
||||
onTemplatePress,
|
||||
onVideoChange,
|
||||
error,
|
||||
}: TemplateListProps) {
|
||||
const tintColor = useThemeColor({}, 'tint');
|
||||
@@ -89,8 +91,14 @@ export function TemplateList({
|
||||
<FlatList
|
||||
data={templates}
|
||||
keyExtractor={(item) => item.id}
|
||||
renderItem={({ item }) => (
|
||||
<TemplateCard template={item} onPress={onTemplatePress} />
|
||||
renderItem={({ item, index }) => (
|
||||
<TemplateCard
|
||||
template={item}
|
||||
onPress={onTemplatePress}
|
||||
allTemplates={templates}
|
||||
currentIndex={index}
|
||||
onVideoChange={onVideoChange}
|
||||
/>
|
||||
)}
|
||||
numColumns={2}
|
||||
columnWrapperStyle={styles.row}
|
||||
|
||||
Reference in New Issue
Block a user