working on search
This commit is contained in:
1 parent
797c0f8fda
commit
70615202dc
2 files changed
+15
-4
No files matched your search
+13
-3
@@ -1,6 +1,7 @@
|
||||
import {View, Text} from 'react-native'
|
||||
import {View, Text, TextInput, SafeAreaView, Image} from 'react-native'
|
||||
import React, {useState} from 'react'
|
||||
import {useLocalSearchParams, usePathname} from "expo-router";
|
||||
import icons from "@/constants/icons";
|
||||
|
||||
const Search = () => {
|
||||
const path = usePathname();
|
||||
@@ -8,11 +9,20 @@ const Search = () => {
|
||||
const [search, setSearch] = useState(params.query);
|
||||
|
||||
const handleSearch = (text: string) => {
|
||||
// console.log(search)
|
||||
setSearch(text)
|
||||
}
|
||||
return (
|
||||
<View>
|
||||
<Text>Search</Text>
|
||||
<View className={'flex flex-row items-center justify-between w-full px-4 rounded-lg border border-blue-200 mt-5 py-2'}>
|
||||
<View className={'flex-1 flex flex-row items-center justify-start z-50'}>
|
||||
<Image source={icons.search} className={'size-5'}/>
|
||||
<TextInput
|
||||
value={search}
|
||||
onChangeText={handleSearch}
|
||||
placeholder={'Search...'}
|
||||
style={{flex: 1, marginLeft: 10}}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user