import { Feather } from "@expo/vector-icons"; import { BlurView, type BlurViewProps } from "expo-blur"; import { Keyboard, Platform } from "react-native"; import { Pressable, type PressableProps } from "react-native-gesture-handler"; import useRouter from "@/hooks/useAppRouter"; interface Props extends BlurViewProps { background?: "blur" | "transparent"; pressableProps?: Omit; } export const HeaderBackButton: React.FC = ({ background = "transparent", pressableProps, ...props }) => { const router = useRouter(); // Dismiss the keyboard before navigating — otherwise it lingers over the // previous screen (e.g. leaving the Jellyseerr login while typing). const handleBack = () => { Keyboard.dismiss(); router.back(); }; if (Platform.OS === "ios") { return ( ); } if (background === "transparent" && Platform.OS !== "android") return ( ); return ( ); };