Migrate AIDebugButton component to TypeScript. (#3286)

* Migrate `AIDebugButton` component to TypeScript.

* Reorder keys

* Update to use vision camera's own type

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
This commit is contained in:
Corey Farwell
2025-12-12 05:36:56 -05:00
committed by GitHub
parent c36c94a5df
commit 1e38e21521

View File

@@ -13,15 +13,29 @@ import {
Modal,
Portal
} from "react-native-paper";
import type { CameraDeviceFormat } from "react-native-vision-camera";
import { useDebugMode } from "sharedHooks";
import colors from "styles/tailwindColors";
import SliderControl from "./SliderControl";
interface Props {
debugFormat: CameraDeviceFormat | null;
changeDebugFormat: () => void;
confidenceThreshold: number;
setConfidenceThreshold: ( value: number ) => void;
fps: number;
setFPS: ( value: number ) => void;
numStoredResults: number;
setNumStoredResults: ( value: number ) => void;
cropRatio: number;
setCropRatio: ( value: number ) => void;
}
const AIDebugButton = ( {
debugFormat,
changeDebugFormat,
confidenceThreshold,
debugFormat,
setConfidenceThreshold,
fps,
setFPS,
@@ -29,7 +43,7 @@ const AIDebugButton = ( {
setNumStoredResults,
cropRatio,
setCropRatio
} ) => {
}: Props ) => {
const [modalVisible, setModalVisible] = useState( false );
const [slideIndex, setSlideIndex] = useState( 0 );
const { isDebug } = useDebugMode( );