This commit is contained in:
imeepos
2025-10-21 10:21:45 +08:00
parent 7e3f94bae3
commit 3a99ff96d5
28 changed files with 6981 additions and 176 deletions

View File

@@ -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}