diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-13 21:43:44 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-03-14 16:40:45 +0000 |
| commit | 04572a8e5081b1e4871e273cde9dbaaa44c52fe0 (patch) | |
| tree | 8e993acb732a50d1306d4d6953df96c165c57f57 /packages/mobile/app/dashboard/(tabs)/search.tsx | |
| parent | 2df08ed08c065e8b91bc8df0266bd4bcbb062be4 (diff) | |
| download | karakeep-04572a8e5081b1e4871e273cde9dbaaa44c52fe0.tar.zst | |
structure: Create apps dir and copy tooling dir from t3-turbo repo
Diffstat (limited to 'packages/mobile/app/dashboard/(tabs)/search.tsx')
| -rw-r--r-- | packages/mobile/app/dashboard/(tabs)/search.tsx | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/packages/mobile/app/dashboard/(tabs)/search.tsx b/packages/mobile/app/dashboard/(tabs)/search.tsx deleted file mode 100644 index 980cab36..00000000 --- a/packages/mobile/app/dashboard/(tabs)/search.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { keepPreviousData } from "@tanstack/react-query"; -import { useState } from "react"; -import { View } from "react-native"; -import { useDebounce } from "use-debounce"; - -import BookmarkList from "@/components/bookmarks/BookmarkList"; -import { Divider } from "@/components/ui/Divider"; -import { Input } from "@/components/ui/Input"; -import { api } from "@/lib/trpc"; - -export default function Search() { - const [search, setSearch] = useState(""); - - const [query] = useDebounce(search, 200); - - const { data } = api.bookmarks.searchBookmarks.useQuery( - { text: query }, - { placeholderData: keepPreviousData }, - ); - - return ( - <View> - <Input - placeholder="Search" - className="mx-4 mt-4 bg-white" - value={search} - onChangeText={setSearch} - autoFocus - autoCapitalize="none" - /> - <Divider orientation="horizontal" className="mb-1 mt-4 w-full" /> - {data && <BookmarkList ids={data.bookmarks.map((b) => b.id)} />} - </View> - ); -} |
