This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crashlytics from "@react-native-firebase/crashlytics"; | |
export type LogLevel = "info" | "warn" | "error"; | |
const ANSI_YELLOW = "\u001b[1;33m"; | |
const ANSI_RED = "\u001b[1;31m"; | |
const ANSI_BLUE = "\u001b[34m"; | |
const ANSI_RESET_CODE = "\u001b[30m"; | |
const LOG_COLORS: Record<LogLevel, string> = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import env from "../../env.json"; | |
/** | |
* Wrapper over the current environment file, provides | |
* utility methods to query the file without having to import it manually | |
*/ | |
export class Environment { | |
/** | |
* Checks wether or not the app is running in debug mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/node | |
/** | |
* This scripts will create a `env.json` file at the root of the project | |
* with the content matching that of the desired environment file, as defined in `/src/env/` | |
* | |
* @example | |
* npx ts-node src/scripts/set-environment.ts production | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, ComponentType, ReactNode } from "react"; | |
import crashlytics from "@react-native-firebase/crashlytics"; | |
export interface ErrorBoundaryProps { | |
fallback: () => ReactNode; | |
} | |
/** | |
* Wraps the provided component in an ErrorBoundary, with the provided fallback. | |
* This should be used on components whose parent is not easy to control, such as |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Wraps the provide component in a `Suspense`, with the provided fallback. | |
* This should be used on components whose parent is not easy to control, such as | |
* React Navigation screens to be able to lazy load them using `React.lazy`. | |
* @param WrappedComponent The component to wrap. | |
* @param fallback The component to render while loading. | |
* | |
* @example | |
* const SomeScreen = withSuspense(React.lazy(() => import("path/to/some/screen"))); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RefObject } from "react"; | |
import { FlatList, FlatListProps } from "react-native"; | |
import Success from "@assets/icons/success.svg"; | |
import Warning from "@assets/icons/warning.svg"; | |
import { ColorCode } from "@models/constants/ColorCode"; | |
import { Row } from "@primitives/Flex/Row"; | |
import { LocalizedText } from "@primitives/LocalizedText/LocalizedText"; | |
import { useScrollToTop } from "@react-navigation/native"; | |
import React, { FC, Fragment, useImperativeHandle, useRef, useState } from "react"; | |
import { ActivityIndicator, FlatList, StyleSheet } from "react-native"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="android:windowLightStatusBar">true</item> | |
<item name="android:statusBarColor">@color/status_bar_color</item> | |
<item name="android:spinnerItemStyle">@style/SpinnerItem</item> | |
<item name="android:spinnerDropDownItemStyle">@style/SpinnerDropDownItem</item> | |
<!-- Text Underline --> | |
<item name="android:editTextBackground">@android:color/transparent</item> | |
<!-- TextInput cursor --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Dimensions, StyleSheet } from "react-native"; | |
const SCALABLE_PROPERTIES = [ | |
"padding", | |
"paddingStart", | |
"paddingEnd", | |
"paddingTop", | |
"paddingBottom", | |
"paddingRight", | |
"paddingLeft", |
OlderNewer