Skip to content

Commit

Permalink
Fix TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianSorinMaxim committed Jul 25, 2022
1 parent 3ab55ba commit f7052f9
Show file tree
Hide file tree
Showing 100 changed files with 46,248 additions and 46,244 deletions.
53 changes: 39 additions & 14 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,62 @@
import React from "react";
import { Platform, StatusBar, StyleSheet, View, Text } from "react-native";
import {
Platform,
StatusBar,
StyleSheet,
View,
Text,
TextInput,
LogBox,
} from "react-native";
import { Provider } from "react-redux";

import { StringValues } from "./src/constants/StringValues";
import { Loader } from "./src/components";

// Persistor
import { PersistGate } from "redux-persist/integration/react";

// Navigation
import { NavigationContainer } from "@react-navigation/native";
import { RootNavigation, navigationRef } from "./src/navigation/RootNavigation";
import { RootStack } from "./src/navigation/AppNavigator";
import { navigationRef } from "./src/navigation/RootNavigation";

// Redux store
import { configureStore } from "./src/store/configureStore";
const { store, persistor } = configureStore();

const Loading = () => (
<View style={styles.loadingContainer}>
<Text>{StringValues.loading}</Text>
</View>
);
LogBox.ignoreLogs(["Require cycle:"]);
interface TextWithDefaultProps extends Text {
defaultProps?: { allowFontScaling?: boolean; maxFontSizeMultiplier?: number };
}

interface TextInputWithDefaultProps extends TextInput {
defaultProps?: { allowFontScaling?: boolean; maxFontSizeMultiplier?: number };
}

(Text as unknown as TextWithDefaultProps).defaultProps =
(Text as unknown as TextWithDefaultProps).defaultProps || {};
(Text as unknown as TextWithDefaultProps).defaultProps!.allowFontScaling = true;
(
Text as unknown as TextWithDefaultProps
).defaultProps!.maxFontSizeMultiplier = 1.8;

(TextInput as unknown as TextInputWithDefaultProps).defaultProps =
(TextInput as unknown as TextInputWithDefaultProps).defaultProps || {};
(
TextInput as unknown as TextInputWithDefaultProps
).defaultProps!.allowFontScaling = true;
(
TextInput as unknown as TextInputWithDefaultProps
).defaultProps!.maxFontSizeMultiplier = 1.8;

const App = () => {
return (
<View style={styles.container}>
<Provider store={store}>
<PersistGate loading={<Loading />} persistor={persistor}>
<PersistGate loading={<Loader />} persistor={persistor}>
{Platform.OS === "ios" && <StatusBar barStyle="default" />}
<NavigationContainer
// TODO: Remove @ts-ignore
// @ts-ignore
ref={navigationRef}>
<RootNavigation />
<NavigationContainer ref={navigationRef}>
<RootStack />
</NavigationContainer>
</PersistGate>
</Provider>
Expand Down
3 changes: 3 additions & 0 deletions __mocks__/react-native-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
API_URL: 'test',
};
12 changes: 12 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,8 @@ PODS:
- react-native-config/App (= 1.4.6)
- react-native-config/App (1.4.6):
- React-Core
- react-native-flipper (0.155.0):
- React-Core
- react-native-pdf (6.5.0):
- React-Core
- react-native-safe-area-context (4.3.1):
Expand Down Expand Up @@ -1237,6 +1239,8 @@ PODS:
- React-Core
- RNCMaskedView (0.1.11):
- React
- RNCPicker (2.4.2):
- React-Core
- RNDeviceInfo (10.0.1):
- React-Core
- RNFastImage (8.5.11):
Expand Down Expand Up @@ -1380,6 +1384,7 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- react-native-config (from `../node_modules/react-native-config`)
- react-native-flipper (from `../node_modules/react-native-flipper`)
- react-native-pdf (from `../node_modules/react-native-pdf`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
Expand All @@ -1396,6 +1401,7 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNFastImage (from `../node_modules/react-native-fast-image`)
- "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)"
Expand Down Expand Up @@ -1514,6 +1520,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/logger"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-flipper:
:path: "../node_modules/react-native-flipper"
react-native-pdf:
:path: "../node_modules/react-native-pdf"
react-native-safe-area-context:
Expand Down Expand Up @@ -1546,6 +1554,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-community/async-storage"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNCPicker:
:path: "../node_modules/@react-native-picker/picker"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNFastImage:
Expand Down Expand Up @@ -1650,6 +1660,7 @@ SPEC CHECKSUMS:
React-jsinspector: 55605caf04e02f9b0e05842b786f1c12dde08f4b
React-logger: ca970551cb7eea2fd814d0d5f6fc1a471eb53b76
react-native-config: 7cd105e71d903104e8919261480858940a6b9c0e
react-native-flipper: 839f62f0b7cd1c28088030b0b04b72d0f88d5d85
react-native-pdf: de35db0d8f1e5d37e65e887554f7d4bd062af56b
react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
React-perflogger: c9161ff0f1c769993cd11d2751e4331ff4ceb7cd
Expand All @@ -1666,6 +1677,7 @@ SPEC CHECKSUMS:
ReactCommon: e30ec17dfb1d4c4f3419eac254350d6abca6d5a2
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNCPicker: 0250e95ad170569a96f5b0555cdd5e65b9084dca
RNDeviceInfo: ee3ec9e7a48fa8a2ea4d711ee312497857e4ee74
RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7
RNFBAnalytics: 1aff53fe7ebd26405ac5e4c99011ccd0a473bf77
Expand Down
25 changes: 12 additions & 13 deletions ios/Pods/CocoaAsyncSocket/README.markdown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions ios/Pods/Flipper-DoubleConversion/README

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 34 additions & 35 deletions ios/Pods/Flipper-Folly/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit f7052f9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ts-ignore's: 2 (unchanged)

Please sign in to comment.