File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed
Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 1313 */
1414
1515import Constants from "expo-constants" ;
16- import { IS_DEVELOPMENT_BUILD } from "../../../utils/env.utils" ;
1716
1817export const BASE_PATH = (
19- ( IS_DEVELOPMENT_BUILD
18+ ( false // TODO
2019 ? `http://${ Constants . expoConfig ?. hostUri ?. split ( ":" ) . shift ( ) ?. concat ( ":3000" ) } `
2120 : "https://api.offlinery.io" ) + "/v1"
2221) . replace ( / \/ + $ / , "" ) ;
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export const OEncounterList = (props: IOEncounterListProps) => {
109109
110110 const getEncounterList = ( ) => {
111111 if ( encounterState . isWalkthroughRunning ) {
112- return < OTourEncounter /> ;
112+ return < OTourEncounter navigation = { navigation } /> ;
113113 } else {
114114 return encounterState . encounters . length > 0 ? (
115115 encounterState . encounters . map ( ( encounter , idx ) => (
Original file line number Diff line number Diff line change 11import { Color } from "@/GlobalStyles" ;
2+ import * as Sentry from "@sentry/react-native" ;
23import React , { useCallback , useState } from "react" ;
34import {
45 ActivityIndicator ,
56 Image ,
7+ ImageErrorEventData ,
68 ImageProps ,
9+ NativeSyntheticEvent ,
710 StyleSheet ,
811 View ,
912} from "react-native" ;
@@ -13,19 +16,26 @@ interface OImageWithLoaderProps extends ImageProps {
1316}
1417
1518export const OImageWithLoader = ( props : OImageWithLoaderProps ) => {
16- const [ isLoading , setIsLoading ] = useState ( false ) ;
19+ const [ isLoading , setIsLoading ] = useState ( true ) ;
1720
18- const handleLoadStart = useCallback ( ( ) => {
21+ const handleLoadStart = ( ) => {
1922 setIsLoading ( true ) ;
20- } , [ ] ) ;
23+ } ;
2124
22- const handleLoadEnd = useCallback ( ( ) => {
25+ const handleLoadEnd = ( ) => {
2326 setIsLoading ( false ) ;
24- } , [ ] ) ;
27+ } ;
2528
26- const handleError = useCallback ( ( ) => {
27- setIsLoading ( false ) ;
28- } , [ ] ) ;
29+ const handleError = useCallback (
30+ ( err : NativeSyntheticEvent < ImageErrorEventData > ) => {
31+ Sentry . captureException ( err , {
32+ tags : {
33+ imageWithLoader : "handleError" ,
34+ } ,
35+ } ) ;
36+ } ,
37+ [ ] ,
38+ ) ;
2939
3040 return (
3141 < View style = { [ styles . container , props . style ] } >
You can’t perform that action at this time.
0 commit comments