This file contains hidden or 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
const data = new FormData(); | |
Object.keys(payload).map(key => data.append(key, payload[key])); |
This file contains hidden or 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
console.log([...formData]) |
This file contains hidden or 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 axios from 'axios'; | |
const api = axios.create({ | |
baseURL: process.env.API_URL, | |
timeout: 10000, | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
}); |
This file contains hidden or 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
adb shell setprop debug.firebase.analytics.app PACKAGE_NAME |
This file contains hidden or 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
Settings.set({ | |
'/google/firebase/debug_mode': 1, | |
'/google/measurement/debug_mode': 1, | |
}); |
This file contains hidden or 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
type GetTestIDArgs<TestID> = { | |
testID: TestID; | |
prefix: string; | |
} | |
export const getTestID = <TestID extends Record<string, string>>({ | |
testID, | |
prefix, | |
}: GetTestIDArgs<TestID>): TestID => { | |
return new Proxy(testID, { |
This file contains hidden or 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 { getTestID } from 'helpers/getTestID/getTestID'; | |
export const TEST_ID = { | |
CONTAINER: 'CONTAINER', | |
LABEL: 'LABEL', | |
}; | |
export const testID = getTestID({ | |
testID: TEST_ID, | |
prefix: 'ACCORDION', |
This file contains hidden or 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 { useRef, MutableRefObject } from 'react'; | |
interface PromiseRef<T, E> { | |
promise: Promise<T>; | |
resolve: (value: T) => void; | |
reject: (reason: E) => void; | |
} | |
type UsePromiseRefReturn<T, E> = [ | |
MutableRefObject<PromiseRef<T, E> | null>, |
This file contains hidden or 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, { FC, useImperativeHandle, useRef } from 'react'; | |
import { Text, View, TouchableOpacity } from "react-native"; | |
import ConfirmHcaptcha from '@hcaptcha/react-native-hcaptcha'; | |
import type { WebViewMessageEvent } from 'react-native-webview'; | |
import { isFunction, isString } from 'lodash'; | |
import { usePromiseRef } from './usePromiseRef'; | |
HCaptchaImperativeRefValue = { |