diff --git a/src/soilId/soilIdHooks.ts b/src/soilId/soilIdHooks.ts index 5a62bb69..83983968 100644 --- a/src/soilId/soilIdHooks.ts +++ b/src/soilId/soilIdHooks.ts @@ -24,9 +24,8 @@ import { fetchDataBasedSoilMatches, fetchLocationBasedSoilMatches, soilDataToIdInput, + SoilIdData, soilIdKey, - SoilIdResults, - SoilIdStatus, } from 'terraso-client-shared/soilId/soilIdSlice'; import type { SharedDispatch } from 'terraso-client-shared/store/store'; import { Coords } from 'terraso-client-shared/types'; @@ -36,12 +35,7 @@ import { Coords } from 'terraso-client-shared/types'; * If multiple components are passing different inputs to this hook simultaneously, it * will not function correctly. */ -export const useSoilIdData = ( - coords: Coords, - siteId?: string, -): SoilIdResults & { - status: SoilIdStatus; -} => { +export const useSoilIdData = (coords: Coords, siteId?: string): SoilIdData => { const dispatch = useDispatch(); /* We only need to select soil data for data-based matches. */ diff --git a/src/soilId/soilIdTypes.ts b/src/soilId/soilIdTypes.ts index 3aabbadb..338f1123 100644 --- a/src/soilId/soilIdTypes.ts +++ b/src/soilId/soilIdTypes.ts @@ -187,3 +187,5 @@ export type SoilIdResults = { locationBasedMatches: LocationBasedSoilMatch[]; dataBasedMatches: DataBasedSoilMatch[]; }; + +export type SoilIdData = SoilIdResults & { status: SoilIdStatus };