@@ -38,7 +38,6 @@ import {Box} from 'terraso-mobile-client/components/NativeBaseAdapters';
38
38
import { positionToCoords } from 'terraso-mobile-client/components/StaticMapView' ;
39
39
import { useGeospatialContext } from 'terraso-mobile-client/context/GeospatialContext' ;
40
40
import { SitesScreenContext } from 'terraso-mobile-client/context/SitesScreenContext' ;
41
- import { fetchSoilDataForUser } from 'terraso-mobile-client/model/soilData/soilDataGlobalReducer' ;
42
41
import { AppBar } from 'terraso-mobile-client/navigation/components/AppBar' ;
43
42
import { ScreenScaffold } from 'terraso-mobile-client/screens/ScreenScaffold' ;
44
43
import { MapHeader } from 'terraso-mobile-client/screens/SitesScreen/components/MapHeader' ;
@@ -54,9 +53,8 @@ import {
54
53
siteCallout ,
55
54
} from 'terraso-mobile-client/screens/SitesScreen/SitesScreenCallout' ;
56
55
import { getSitesScreenFilters } from 'terraso-mobile-client/screens/SitesScreen/utils/sitesScreenFilters' ;
57
- import { useDispatch , useSelector } from 'terraso-mobile-client/store' ;
56
+ import { useSelector } from 'terraso-mobile-client/store' ;
58
57
import {
59
- selectCurrentUserID ,
60
58
selectSites ,
61
59
selectSitesAndUserRoles ,
62
60
} from 'terraso-mobile-client/store/selectors' ;
@@ -65,10 +63,8 @@ export const SitesScreen = memo(() => {
65
63
const siteListBottomSheetRef = useRef < BottomSheet > ( null ) ;
66
64
const [ mapStyleURL , setMapStyleURL ] = useState ( Mapbox . StyleURL . Street ) ;
67
65
const [ calloutState , setCalloutState ] = useState < CalloutState > ( noneCallout ( ) ) ;
68
- const currentUserID = useSelector ( selectCurrentUserID ) ;
69
66
const sites = useSelector ( selectSites ) ;
70
67
const siteList = useMemo ( ( ) => Object . values ( sites ) , [ sites ] ) ;
71
- const dispatch = useDispatch ( ) ;
72
68
const mapRef = useRef < MapRef > ( null ) ;
73
69
const siteProjectRoles = useSelector ( selectSitesAndUserRoles ) ;
74
70
const sitesScreenContext = useContext ( SitesScreenContext ) ;
@@ -95,12 +91,6 @@ export const SitesScreen = memo(() => {
95
91
[ showSiteOnMap , collapseBottomSheet ] ,
96
92
) ;
97
93
98
- useEffect ( ( ) => {
99
- if ( currentUserID !== undefined ) {
100
- dispatch ( fetchSoilDataForUser ( currentUserID ) ) ;
101
- }
102
- } , [ dispatch , currentUserID ] ) ;
103
-
104
94
const currentUserCoords = useSelector ( state => state . map . userLocation . coords ) ;
105
95
106
96
const [ finishedLoading , setFinishedLoading ] = useState ( false ) ;
0 commit comments