From 6055f502053db501f0084dcdb4f9f627caf82306 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Mon, 16 Dec 2024 11:42:23 +0000 Subject: fix(mobule): Fix keyboard issues in the info screen --- .../mobile/app/dashboard/bookmarks/[slug]/info.tsx | 46 +++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'apps') diff --git a/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx b/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx index ff2f6831..906ebdc7 100644 --- a/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx +++ b/apps/mobile/app/dashboard/bookmarks/[slug]/info.tsx @@ -1,18 +1,18 @@ import React from "react"; import { Keyboard, - KeyboardAvoidingView, - Platform, Pressable, - ScrollView, Text, TouchableWithoutFeedback, View, } from "react-native"; +import Animated, { + useAnimatedKeyboard, + useAnimatedStyle, +} from "react-native-reanimated"; import { router, Stack, useLocalSearchParams } from "expo-router"; import TagPill from "@/components/bookmarks/TagPill"; import FullPageError from "@/components/FullPageError"; -import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView"; import FullPageSpinner from "@/components/ui/FullPageSpinner"; import { Input } from "@/components/ui/Input"; import { Skeleton } from "@/components/ui/Skeleton"; @@ -90,7 +90,7 @@ function TitleEditor({ { throw new Error("Unexpected param type"); } + const keyboard = useAnimatedKeyboard(); + + const animatedStyles = useAnimatedStyle(() => ({ + marginBottom: keyboard.height.value, + })); + const { data: bookmark, isPending, @@ -166,10 +172,11 @@ const ViewBookmarkPage = () => { break; } return ( - + ( { ), }} /> - - - - - - - - - - - - - + + + + + + + + + + + ); }; -- cgit v1.2.3-70-g09d2