From 5522e20104da6afe2e4667cf45dbbbbc0e838865 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 23 Nov 2024 20:59:34 +0000 Subject: ui(mobile): Replace bottom sheet with native screens (#690) * Remove bottom sheet from bookmark info page * Remove bottom sheet from manage lists page * Remove bottom sheet from new list page * Remove bottom sheet from new bookmark page * Drop bottom-sheets * Improve the look of the modals * Make the search page fade from bottom --- apps/mobile/components/lists/NewListModal.tsx | 80 --------------------------- 1 file changed, 80 deletions(-) delete mode 100644 apps/mobile/components/lists/NewListModal.tsx (limited to 'apps/mobile/components/lists') diff --git a/apps/mobile/components/lists/NewListModal.tsx b/apps/mobile/components/lists/NewListModal.tsx deleted file mode 100644 index d31ac362..00000000 --- a/apps/mobile/components/lists/NewListModal.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import React, { useState } from "react"; -import { Text, View } from "react-native"; -import { - BottomSheetBackdrop, - BottomSheetModal, - BottomSheetModalProps, - BottomSheetView, - useBottomSheetModal, -} from "@gorhom/bottom-sheet"; - -import { useCreateBookmarkList } from "@hoarder/shared-react/hooks/lists"; - -import { Button } from "../ui/Button"; -import { Input } from "../ui/Input"; -import PageTitle from "../ui/PageTitle"; -import { useToast } from "../ui/Toast"; - -const NewListModal = React.forwardRef< - BottomSheetModal, - Omit ->(({ ...props }, ref) => { - const { dismiss } = useBottomSheetModal(); - const { toast } = useToast(); - const [text, setText] = useState(""); - - const { mutate, isPending } = useCreateBookmarkList({ - onSuccess: () => { - dismiss(); - }, - onError: () => { - toast({ - message: "Something went wrong", - variant: "destructive", - }); - }, - }); - - const onSubmit = () => { - mutate({ - name: text, - icon: "🚀", - }); - }; - - return ( - - setText("")} - backdropComponent={(props) => ( - - )} - {...props} - > - - - - 🚀 - - -