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
| { | |
| "@eva-design/eva": "^2.0.0", | |
| "@expo/react-native-action-sheet": "^3.8.0", | |
| "@react-native-community/async-storage": "~1.12.0", | |
| "@react-native-community/masked-view": "0.1.10", | |
| "@react-native-community/slider": "3.0.3", | |
| "@react-navigation/bottom-tabs": "^5.7.3", | |
| "@react-navigation/drawer": "^5.11.5", | |
| "@react-navigation/native": "^5.7.1", | |
| "@react-navigation/stack": "^5.7.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
| import React, { useEffect } from 'react' | |
| import { runTiming } from 'utils/animations' | |
| import Animated from 'react-native-reanimated' | |
| import { | |
| Dimensions, | |
| Keyboard, | |
| UIManager, | |
| TextInput, | |
| Platform | |
| } from 'react-native' |
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 TextInput = (props) => { | |
| return ( | |
| <React.Fragment> | |
| <Label>{props.label}</Label> | |
| <Input {...props} /> | |
| </React.Fragment> | |
| ) | |
| } |
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 * as Yup from 'yup' | |
| import { cep } from 'utils/textMask' | |
| import { TextInput } from 'components' | |
| import { AddressService } from 'services' | |
| import removeMask from 'utils/removeMask' | |
| const _fillAddress = async (inputProps: Record<string, any>) => { | |
| const { value: zipCode, setFieldValue } = inputProps | |
| const response = await AddressService(removeMask(zipCode)) |
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
| return axios.request({ url, method, data, params, headers }) | |
| .catch((error) => { | |
| console.table(throwError(error)) | |
| receivedError.status === 401 && dispatchAction(AuthActions.logout) | |
| }) |
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 api = (() => { | |
| return { | |
| login: login(getPublicResource) | |
| } | |
| })() | |
| export default api |
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 idx from 'idx' | |
| import CreateInterface from './interfaces/CreateInterface' | |
| const create: CreateInterface = async (getPublicResource, register) => { | |
| const method = 'POST' | |
| const endpoint = '/auth/sign_in' | |
| const data = register | |
| const response = await getPublicResource({ method, endpoint, data }) |
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' | |
| import throwError from './throwError' | |
| import { inbound, outbound } from './interceptors' | |
| import { GetPublicResourceInterface } from './Interfaces' | |
| const getPublicResource = async (props: GetPublicResourceInterface) => { | |
| const { endpoint, method, data, params, headers } = props | |
| const API_URL = 'https://some.url.here/v1' | |
| const url = `${API_URL}${endpoint}` |
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 from 'react' | |
| import Spinner from '../Spinner' | |
| import ButtonIcon from './ButtonIcon' | |
| import ButtonLabel from './ButtonLabel' | |
| import ButtonContainer from './ButtonContainer' | |
| import ButtonInterface from './ButtonInterface' | |
| import { TouchableWithoutFeedback } from 'react-native' | |
| const Button: React.FC<ButtonInterface> = (props) => { | |
| const { |
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
| //action | |
| export const loginAsync = createAsyncAction( | |
| 'LOGIN_REQUEST', | |
| 'LOGIN_SUCCESS', | |
| 'LOGIN_FAILURE' | |
| )<undefined, Auth, string>() | |
| //reducer | |
| const loginReducer = createReducer(initialState as Auth) |
NewerOlder