Library headers, filters and favorites

This commit is contained in:
Simon Caron
2025-01-01 21:57:46 -05:00
parent bb141cad57
commit e23387a384
9 changed files with 81 additions and 30 deletions

View File

@@ -19,6 +19,7 @@ import { StyleSheet, TouchableOpacity, View, ViewProps } from "react-native";
import { Ionicons } from "@expo/vector-icons";
import { Button } from "../Button";
import { Input } from "../common/Input";
import { useTranslation } from "react-i18next";
interface Props<T> extends ViewProps {
open: boolean;
@@ -76,6 +77,7 @@ export const FilterSheet = <T,>({
}: Props<T>) => {
const bottomSheetModalRef = useRef<BottomSheetModal>(null);
const snapPoints = useMemo(() => ["80%"], []);
const { t } = useTranslation();
const [data, setData] = useState<T[]>([]);
const [offset, setOffset] = useState<number>(0);
@@ -156,7 +158,7 @@ export const FilterSheet = <T,>({
<Text className="mb-2 text-neutral-500">{_data?.length} items</Text>
{showSearch && (
<Input
placeholder="Search..."
placeholder={t("search.search")}
className="my-2"
value={search}
onChangeText={(text) => {