From ce33c50a9c1fa67c0ec9e2682d452fd22bf5ae30 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Mon, 22 Apr 2024 15:18:35 +0000 Subject: [PATCH] chore: fix type error in ObservationsList component This is a types-only change and should have no impact on functionality. TypeScript complained about the type we used for ``'s `getItemLayout` prop. Specifically, it complained that the first argument was invalid. We don't even use the first argument, so we can just use the `unknown` type to sidestep this issue. --- src/frontend/screens/ObservationsList/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/frontend/screens/ObservationsList/index.tsx b/src/frontend/screens/ObservationsList/index.tsx index e14463713..fb61def63 100644 --- a/src/frontend/screens/ObservationsList/index.tsx +++ b/src/frontend/screens/ObservationsList/index.tsx @@ -32,10 +32,7 @@ const m = defineMessages({ const OBSERVATION_CELL_HEIGHT = 80; -const getItemLayout = ( - data: Observation[] | null | undefined, - index: number, -) => ({ +const getItemLayout = (_data: unknown, index: number) => ({ length: OBSERVATION_CELL_HEIGHT, offset: OBSERVATION_CELL_HEIGHT * index, index,