11import { Color , Title } from "@/GlobalStyles" ;
22import { OGoLiveToggle } from "@/components/OGoLiveToggle/OGoLiveToggle" ;
33import { OPageHeader } from "@/components/OPageHeader/OPageHeader" ;
4- import {
5- EACTION_ENCOUNTERS ,
6- useEncountersContext ,
7- } from "@/context/EncountersContext" ;
4+ import { OPageHeaderEncounters } from "@/components/OPageHeader/OPageHeaderEncounters/OPageHeaderEncounters" ;
85import { useNotifications } from "@/hooks/useNotifications" ;
96import { TR , i18n } from "@/localization/translate.service" ;
107import { MainTabs } from "@/screens/main/MainScreenTabs.navigator" ;
@@ -23,29 +20,16 @@ import ProfileSettings from "./ProfileSettings";
2320export const MainScreenTabs = ( { navigation } : any ) => {
2421 useNotifications ( navigation ) ;
2522
26- const { state : encounterState , dispatch : dispatchEncounters } =
27- useEncountersContext ( ) ;
2823 const { tourKey : tourKeyFind , start : startTourFind } =
2924 useTourGuideController ( TOURKEY . FIND ) ;
30- const { start : startTourEncounters } = useTourGuideController (
31- TOURKEY . ENCOUNTERS ,
32- ) ;
3325
3426 // @dev true by default to not unnecessarily distract user
3527 const [ hasDoneFindWalkthrough , setHasDoneFindWalkthrough ] = useState ( true ) ;
36- const [ hasDoneEncounterWalkthrough , setHasDoneEncounterWalkthrough ] =
37- useState ( true ) ;
3828
3929 useEffect ( ( ) => {
40- const getValues = [
41- getLocalValue ( LOCAL_VALUE . HAS_DONE_FIND_WALKTHROUGH ) ,
42- getLocalValue ( LOCAL_VALUE . HAS_DONE_ENCOUNTER_WALKTHROUGH ) ,
43- ] ;
44-
45- Promise . all ( getValues )
46- . then ( ( vals : boolean [ ] ) => {
47- setHasDoneFindWalkthrough ( vals [ 0 ] ) ;
48- setHasDoneEncounterWalkthrough ( vals [ 1 ] ) ;
30+ getLocalValue ( LOCAL_VALUE . HAS_DONE_FIND_WALKTHROUGH )
31+ . then ( ( value : boolean ) => {
32+ setHasDoneFindWalkthrough ( value ) ;
4933 } )
5034 . catch ( ( err ) => {
5135 Sentry . captureException ( err , {
@@ -110,18 +94,7 @@ export const MainScreenTabs = ({ navigation }: any) => {
11094 component = { EncounterScreenStack }
11195 options = { {
11296 tabBarLabel : i18n . t ( TR . encounters ) ,
113- headerLeft : ( ) => (
114- < OPageHeader
115- title = { i18n . t ( TR . encounters ) }
116- highlightHelpBtn = { ! hasDoneEncounterWalkthrough }
117- onHelpPress = { ( ) => {
118- dispatchEncounters ( {
119- type : EACTION_ENCOUNTERS . SET_IS_WALKTHROUGH_RUNNING ,
120- payload : true ,
121- } ) ;
122- } }
123- />
124- ) ,
97+ headerLeft : ( ) => < OPageHeaderEncounters /> ,
12598 // tabBarBadge:
12699 // unreadNotifications.length === 0
127100 // ? undefined
0 commit comments