diff --git a/src/components/SearchPage.js b/src/components/SearchPage.js new file mode 100644 index 0000000..50995e1 --- /dev/null +++ b/src/components/SearchPage.js @@ -0,0 +1,63 @@ +import React, { useEffect, useCallback, useMemo, useState, useRef } from 'react'; +import { List, Divider, Text, TouchableRipple, Searchbar } from 'react-native-paper'; +import { StyleSheet, View, ScrollView } from 'react-native'; +import { colors } from '../utils/color' +import { useRoute } from '@react-navigation/native'; +export default function SearchPage({ navigation }) { + const [searchQuery, setSearchQuery] = React.useState(''); + const route = useRoute(); + const { dummyData } = route.params; + + const handleProjectSelect = (project) => { + console.log("project", project); + navigation.goBack() + }; + + const filteredData = dummyData.filter(item => + item.name.toLowerCase().includes(searchQuery.toLowerCase()) + ); + + return ( + + + + + {filteredData.map(item => ( + <> + handleProjectSelect(item)}> + } + /> + + + ))} + + + + ); +} + + +const styles = StyleSheet.create({ + container: { + flex: 1, + marginTop: 50, + marginHorizontal: 10, + + }, + listData: { + flex: 1, + marginTop: 20, + marginHorizontal: 10 + }, +}); \ No newline at end of file