feat: swap sectionlists for @shopify/flashlist

This commit is contained in:
Lei Nelissen
2025-05-22 23:36:53 +02:00
parent c430047106
commit d9326dfc7a
8 changed files with 208 additions and 160 deletions

View File

@@ -33,7 +33,7 @@ const Letter = styled.Text`
`;
interface Props {
onSelect: (index: number) => void;
onSelect: (selected: { index: number, letter: string }) => void;
}
/**
@@ -56,7 +56,7 @@ const AlphabetScroller: React.FC<Props> = ({ onSelect }) => {
if (newIndex !== index) {
setIndex(newIndex);
onSelect(newIndex);
onSelect({ index: newIndex, letter: ALPHABET_LETTERS[newIndex] });
}
}, [height, index, onSelect]);