Skip to content

Commit

Permalink
Fix list key warning
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 5, 2024
1 parent cdb7b90 commit e738a6f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/(tabs)/genre/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function GenreScreen() {
genreName: string;
}>();

// console.log('passing in genreId params:', genreId);
// console.log('testing passing in genreType', genreType);
// console.log('testing genreName', genreName);
console.log('passing in genreId params:', genreId);
console.log('testing passing in genreType', genreType);
console.log('testing genreName', genreName);

useEffect(() => {
const checkTopic = (preview: StoryPreview): boolean => {
Expand Down Expand Up @@ -172,6 +172,7 @@ function GenreScreen() {
<TouchableOpacity
onPress={() => filterBySubgenre(subgenre)} //onPress will trigger the filterBySubgenre function
style={{ marginRight: 40 }}
key={index}
>
<Text
style={selectedSubgenre === subgenre ? styles.textSelected : null}
Expand Down Expand Up @@ -252,7 +253,7 @@ function GenreScreen() {
style={styles.flatListStyle}
renderItem={({ item }) => (
<PreviewCard
key={item.title}
key={item.id}
// topic={item.topic}
// tone={item.tone}
// genreMedium={item.genre_medium}
Expand Down Expand Up @@ -295,7 +296,7 @@ function GenreScreen() {
{renderFilterDropdown("Topic", currentTopics, genreTopics, setCurrentTopics)}
</View>

{genreStoryIds.length === 0 && !isLoading ? ( // Check if there are no story IDs
{genreStoryIds.length === 0 && !isLoading ? (
renderNoStoryText()
) : (
<>
Expand Down

0 comments on commit e738a6f

Please sign in to comment.