From 80cb5310c407083ad23ac25b70fa347597b5e543 Mon Sep 17 00:00:00 2001 From: zimplexing Date: Fri, 25 Jul 2025 18:24:42 +0800 Subject: [PATCH] fix: UI issue --- components/CustomScrollView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/CustomScrollView.tsx b/components/CustomScrollView.tsx index ab45e42..18ae69a 100644 --- a/components/CustomScrollView.tsx +++ b/components/CustomScrollView.tsx @@ -1,4 +1,4 @@ -import React, { useState, useCallback } from "react"; +import React, { useCallback } from "react"; import { View, StyleSheet, ScrollView, Dimensions, ActivityIndicator } from "react-native"; import { ThemedText } from "@/components/ThemedText"; @@ -91,7 +91,7 @@ const CustomScrollView: React.FC = ({ <> {/* Render content in a grid layout */} {Array.from({ length: Math.ceil(data.length / numColumns) }).map((_, rowIndex) => ( - + {data.slice(rowIndex * numColumns, (rowIndex + 1) * numColumns).map((item, index) => ( {renderItem({ item, index: rowIndex * numColumns + index })} @@ -121,6 +121,11 @@ const styles = StyleSheet.create({ paddingHorizontal: 16, paddingBottom: 20, }, + rowContainer: { + flexDirection: "row", + justifyContent: "flex-start", + flexWrap: "wrap", + }, itemContainer: { margin: 8, alignItems: "center",