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
| lorem ipsum |
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 { init, RematchRootState } from '@rematch/core'; | |
| import createPersistPlugin from '@rematch/persist'; | |
| import * as models from './models'; | |
| const persist = createPersistPlugin({ | |
| whitelist: [], | |
| }); | |
| const store = init({ |
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
| function translate(document: any) { | |
| if (typeof document !== 'object') return {}; | |
| return ({ raw, ...dictionary }: { raw: string[] }) => { | |
| if (Array.isArray(document)) { | |
| // @ts-ignore | |
| return document.map((v: {}) => translate(v)({ raw, ...dictionary })); | |
| } | |
| if (raw !== undefined) { |
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
| /* eslint-disable react-hooks/exhaustive-deps */ | |
| import { useState } from 'react'; | |
| const useRequest = (request: Function = () => ({})) => { | |
| const [data, setData] = useState(null); | |
| const [isError, setIsError] = useState(false); | |
| const [isLoading, setIsLoading] = useState(false); |
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 MockAdapter from 'axios-mock-adapter'; | |
| const api = axios.create({ | |
| baseURL: '...', | |
| }); | |
| export const mock = new MockAdapter(api, { delayResponse: 2000 }); | |
| 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 React from 'react'; | |
| import TableCommunity from 'rc-table'; | |
| import { GetComponentProps } from 'rc-table/lib/interface'; | |
| interface Props { | |
| columns: Array<{ | |
| [key: string]: any; | |
| }>; | |
| data: object[]; |
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
| /* @flow */ | |
| export const REGISTER_USER_REQUEST = "REGISTER_USER_REQUEST"; | |
| export const REGISTER_USER_SUCCESS = "REGISTER_USER_SUCCESS"; | |
| export const REGISTER_USER_FAILURE = "REGISTER_USER_FAILURE"; | |
| export function success(payload) { | |
| return dispatch => { | |
| dispatch({ | |
| type: REGISTER_USER_SUCCESS, |
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 { Alert } from "react-native"; | |
| import { connect } from "react-redux"; | |
| import { compose, withHandlers, lifecycle } from "recompose"; | |
| import { css, withStyles, withRouter } from "../../common"; | |
| import Intro from "./Intro"; | |
| function componentDidMount() { |
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
| /** | |
| * @param {*} obj - Objeto a ser rastreado. | |
| * @param {*} key - Percurso a ser traçado. | |
| * | |
| * Exemplo: | |
| * var obj = { a: { b: { c: 100 } } }; | |
| * get(obj, 'a.b.c'); // return 100. | |
| */ | |
| export default function Get(obj, key) { |
NewerOlder