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 { instance } from '../../api' | |
| const state = { | |
| statsGeneral: [], | |
| loadingStatsGeneral: true, | |
| statsClients: [], | |
| loadingStatsClients: true | |
| } |
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
| // We use react-hook-form library for form validations | |
| // We use react-native-elements library for UI components | |
| import React from 'react' | |
| import { useSelector, useDispatch } from 'react-redux' | |
| import { StatusBar, View, TextInput, ActivityIndicator } from 'react-native' | |
| import { Button, Text } from 'react-native-elements' | |
| import { useForm } from 'react-hook-form' |
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
| // We use useImperativeHandle for having ability to call methods from parent component. | |
| // We use onMessage method from WebView for triggering needed states from any web apps. | |
| import React, { forwardRef, useImperativeHandle, useRef, memo } from 'react' | |
| import { WebView } from 'react-native-webview' | |
| const WebViewLink = forwardRef(({ onMessage }, ref) => { | |
| const webviewRef = useRef() |
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 GamesService from '../../services/games' | |
| import store from '../index' | |
| function getGamesAction () { | |
| return async (dispatch) => { | |
| dispatch({ type: 'GET_GAMES_REQUEST'}) | |
| try { | |
| const { data } = await GamesService.getGames() |
NewerOlder