Skip to content

Commit

Permalink
chore: merging global error toast with client lib + some refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasburtey committed Jan 23, 2023
1 parent 6ef2942 commit bb526b2
Show file tree
Hide file tree
Showing 14 changed files with 185 additions and 338 deletions.
158 changes: 0 additions & 158 deletions __tests__/screens/global-error.spec.tsx

This file was deleted.

18 changes: 8 additions & 10 deletions app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { useMemo, useRef, useState } from "react"
import { Dimensions, Linking } from "react-native"
import EStyleSheet from "react-native-extended-stylesheet"
import { RootSiblingParent } from "react-native-root-siblings"
import { GlobalErrorToast } from "./components/global-error"
import "./utils/polyfill"
import { RootStack } from "./navigation/root-navigator"
import ErrorBoundary from "react-native-error-boundary"
Expand Down Expand Up @@ -128,10 +127,10 @@ export const App = (): JSX.Element => {
return (
<AuthenticationContext.Provider value={{ isAppLocked, setAppUnlocked, setAppLocked }}>
<ThemeProvider theme={theme}>
<GaloyClient>
<TypesafeI18n locale={customLocaleDetector()}>
<LocalizationContextProvider>
<ErrorBoundary FallbackComponent={ErrorScreen}>
<TypesafeI18n locale={customLocaleDetector()}>
<GaloyClient>
<ErrorBoundary FallbackComponent={ErrorScreen}>
<LocalizationContextProvider>
<NavigationContainer
linking={linking}
onStateChange={(state) => {
Expand All @@ -149,15 +148,14 @@ export const App = (): JSX.Element => {
}}
>
<RootSiblingParent>
<GlobalErrorToast />
<RootStack />
<GaloyToast />
</RootSiblingParent>
</NavigationContainer>
</ErrorBoundary>
</LocalizationContextProvider>
</TypesafeI18n>
</GaloyClient>
</LocalizationContextProvider>
</ErrorBoundary>
</GaloyClient>
</TypesafeI18n>
</ThemeProvider>
</AuthenticationContext.Provider>
)
Expand Down
87 changes: 0 additions & 87 deletions app/components/global-error/global-error.tsx

This file was deleted.

1 change: 0 additions & 1 deletion app/components/global-error/index.ts

This file was deleted.

3 changes: 3 additions & 0 deletions app/graphql/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export const createCache = () =>
// https://www.apollographql.com/docs/react/caching/cache-configuration/#customizing-cache-ids
keyFields: [],
},
Globals: {
keyFields: [],
},
Contact: {
fields: {
prettyName: {
Expand Down
Loading

0 comments on commit bb526b2

Please sign in to comment.