import { useEffect } from "react";
import { BackHandler } from "react-native";

export function useDisableBackButton() {
  useEffect(() => {
    const listener = BackHandler.addEventListener(
      "hardwareBackPress",
      () => {
        return true;
      }
    );
    return () => {
      listener.remove();
    };
  }, []);
}
