From 7e3f6f030680a8cf7b5baa3ce6f33acd5766fca8 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 26 Jan 2023 11:25:52 -0600 Subject: Fix all type errors --- src/view/com/util/images/ImageLayoutGrid.tsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/view/com/util/images/ImageLayoutGrid.tsx') diff --git a/src/view/com/util/images/ImageLayoutGrid.tsx b/src/view/com/util/images/ImageLayoutGrid.tsx index dd0ea3775..97ad9d700 100644 --- a/src/view/com/util/images/ImageLayoutGrid.tsx +++ b/src/view/com/util/images/ImageLayoutGrid.tsx @@ -13,7 +13,7 @@ import {DELAY_PRESS_IN} from './constants' interface Dim { width: number - height: numberPressIn + height: number } export type ImageLayoutGridType = 'two' | 'three' | 'four' @@ -28,6 +28,7 @@ export function ImageLayoutGrid({ type: ImageLayoutGridType uris: string[] onPress?: (index: number) => void + onLongPress?: (index: number) => void style?: StyleProp }) { const [containerInfo, setContainerInfo] = React.useState() @@ -64,6 +65,7 @@ function ImageLayoutGridInner({ type: ImageLayoutGridType uris: string[] onPress?: (index: number) => void + onLongPress?: (index: number) => void containerInfo: Dim }) { const size1 = React.useMemo(() => { @@ -91,14 +93,14 @@ function ImageLayoutGridInner({ onPress?.(0)} - onLongPress={() => onLongPress(0)}> + onLongPress={() => onLongPress?.(0)}> onPress?.(1)} - onLongPress={() => onLongPress(1)}> + onLongPress={() => onLongPress?.(1)}> @@ -110,7 +112,7 @@ function ImageLayoutGridInner({ onPress?.(0)} - onLongPress={() => onLongPress(0)}> + onLongPress={() => onLongPress?.(0)}> @@ -118,14 +120,14 @@ function ImageLayoutGridInner({ onPress?.(1)} - onLongPress={() => onLongPress(1)}> + onLongPress={() => onLongPress?.(1)}> onPress?.(2)} - onLongPress={() => onLongPress(2)}> + onLongPress={() => onLongPress?.(2)}> @@ -139,14 +141,14 @@ function ImageLayoutGridInner({ onPress?.(0)} - onLongPress={() => onLongPress(0)}> + onLongPress={() => onLongPress?.(0)}> onPress?.(1)} - onLongPress={() => onLongPress(1)}> + onLongPress={() => onLongPress?.(1)}> @@ -155,14 +157,14 @@ function ImageLayoutGridInner({ onPress?.(2)} - onLongPress={() => onLongPress(2)}> + onLongPress={() => onLongPress?.(2)}> onPress?.(3)} - onLongPress={() => onLongPress(3)}> + onLongPress={() => onLongPress?.(3)}> -- cgit 1.4.1