From e6883eb98263a0641ddce8e0f695b0eee6bce8ca Mon Sep 17 00:00:00 2001 From: Akshay Thakur Date: Mon, 27 Nov 2023 19:36:13 -0800 Subject: [PATCH] remove extraneous files --- src/app/(tabs)/search/index.tsx | 12 +----- src/components/LandingCard/LandingCard.tsx | 35 --------------- src/components/LandingCard/styles.ts | 31 ------------- .../LandingScrollView/LandingScrollView.tsx | 43 ------------------- src/components/LandingScrollView/styles.ts | 26 ----------- 5 files changed, 2 insertions(+), 145 deletions(-) delete mode 100644 src/components/LandingCard/LandingCard.tsx delete mode 100644 src/components/LandingCard/styles.ts delete mode 100644 src/components/LandingScrollView/LandingScrollView.tsx delete mode 100644 src/components/LandingScrollView/styles.ts diff --git a/src/app/(tabs)/search/index.tsx b/src/app/(tabs)/search/index.tsx index f3ee3178..30824587 100644 --- a/src/app/(tabs)/search/index.tsx +++ b/src/app/(tabs)/search/index.tsx @@ -1,19 +1,11 @@ import { SearchBar } from '@rneui/themed'; -import { Link, router } from 'expo-router'; +import { router } from 'expo-router'; import React, { useEffect, useState } from 'react'; -import { - Button, - FlatList, - View, - TouchableOpacity, - Text, - ScrollView, -} from 'react-native'; +import { Button, FlatList, View } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; import styles from './styles'; import FilterModal from '../../../components/FilterModal/FilterModal'; -import LandingCard from '../../../components/LandingCard/LandingCard'; import SearchCard from '../../../components/PreviewCard/PreviewCard'; import { fetchAllStoryPreviews } from '../../../queries/stories'; import { StoryPreview } from '../../../queries/types'; diff --git a/src/components/LandingCard/LandingCard.tsx b/src/components/LandingCard/LandingCard.tsx deleted file mode 100644 index e9ab0870..00000000 --- a/src/components/LandingCard/LandingCard.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { - GestureResponderEvent, - Image, - Pressable, - Text, - View, - TouchableOpacity, -} from 'react-native'; - -import styles from './styles'; -import globalStyles from '../../styles/globalStyles'; - -type LandingCardProps = { - genre_medium: string; - image: string; - id: number; //story ID to send for routing - pressFunction: (event: GestureResponderEvent) => void; -}; - -function LandingCard({ genre_medium, id, pressFunction }: LandingCardProps) { - return ( - - - - - {genre_medium} - - - - ); -} - -export default LandingCard; - -//landing scroll will pass a color prop into the landingcard component? diff --git a/src/components/LandingCard/styles.ts b/src/components/LandingCard/styles.ts deleted file mode 100644 index 34492fa3..00000000 --- a/src/components/LandingCard/styles.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { StyleSheet } from 'react-native'; - -import colors from '../../styles/colors'; - -const styles = StyleSheet.create({ - contentCardContainer: { - marginRight: 20, - flexDirection: 'column', - justifyContent: 'space-between', - }, - card: { - height: 135, - width: 120, - backgroundColor: colors.lime, - borderRadius: 4, - marginBottom: 8, - }, - overlayContainer: { - ...StyleSheet.absoluteFillObject, // This makes the overlay cover the entire parent container - justifyContent: 'flex-end', - flexDirection: 'row', - alignItems: 'flex-end', - }, - overlayText: { - color: 'white', - paddingBottom: 20, - whiteSpace: 'pre-wrap', - }, -}); - -export default styles; diff --git a/src/components/LandingScrollView/LandingScrollView.tsx b/src/components/LandingScrollView/LandingScrollView.tsx deleted file mode 100644 index f05dcb11..00000000 --- a/src/components/LandingScrollView/LandingScrollView.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { - GestureResponderEvent, - Image, - Pressable, - Text, - View, -} from 'react-native'; - -import styles from './styles'; -import globalStyles from '../../styles/globalStyles'; - -type ContentCardProps = { - title: string; - author: string; - image: string; - pressFunction: (event: GestureResponderEvent) => void; -}; - -//landing scroll should have a see all button and title for genre -function ContentCard({ - title, - author, - image, - pressFunction, -}: ContentCardProps) { - return ( - - - - - - {title} - - - {author} - - - - - ); -} - -export default ContentCard; diff --git a/src/components/LandingScrollView/styles.ts b/src/components/LandingScrollView/styles.ts deleted file mode 100644 index 1ea6f118..00000000 --- a/src/components/LandingScrollView/styles.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { StyleSheet } from 'react-native'; - -import colors from '../../styles/colors'; - -const styles = StyleSheet.create({ - contentCard: { - marginRight: 20, - flexDirection: 'column', - justifyContent: 'space-between', - }, - image: { - height: 140, - width: 148, - backgroundColor: colors.lime, - borderRadius: 4, - marginBottom: 8, - }, - textContainer: { - width: 148, - }, - title: { - marginBottom: 4, - }, -}); - -export default styles;