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 MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
| const path = require('path'); | |
| const webpack = require('webpack'); | |
| module.exports = { | |
| entry: path.resolve(__dirname, '..', 'src', 'index.js'), | |
| module: { | |
| rules: [ | |
| { | |
| test: /\.js$/, |
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 MaskedInput from 'react-text-mask'; | |
| import { Form, Input } from '@rocketseat/unform'; | |
| import PropTypes from 'prop-types'; | |
| import * as Yup from 'yup'; | |
| import iconPerson from '~/assets/img/svg/inline/icon-person.inline.svg'; | |
| import Mask from '~/components/Mask'; | |
| import Modal from '~/components/Modal'; |
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, { useState, useRef, useEffect } from 'react'; | |
| import InputMask from 'react-input-mask'; | |
| import { useField } from '@rocketseat/unform'; | |
| export default function Mask({ name, inputMask }) { | |
| const ref = useRef(null); | |
| const { fieldName, registerField, defaultValue, error } = useField(name); | |
| const [mask, setMask] = useState(defaultValue); | |
| debugger |
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, { useRef, useEffect } from 'react'; | |
| import MaskedInput from 'react-text-mask'; | |
| import { useField, Input } from '@rocketseat/unform'; | |
| import PropTypes from 'prop-types'; | |
| export default function InputMaskComponent({ name, mask, ...rest }) { | |
| const { fieldName, defaultValue, registerField, error } = useField(name); | |
| const ref = 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 React, { useState, useRef, useEffect } from 'react'; | |
| import InputMask from 'react-input-mask'; | |
| import { useField } from '@rocketseat/unform'; | |
| export default function Mask({ name, inputMask }) { | |
| const ref = useRef(null); | |
| const { fieldName, registerField, defaultValue, error } = useField(name); | |
| const [mask, setMask] = useState(defaultValue || ''); |
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, { useRef, useEffect } from 'react'; | |
| import Select, { components } from 'react-select'; | |
| import { useField } from '@rocketseat/unform'; | |
| import PropTypes from 'prop-types'; | |
| import { Container, Label, WrapperMenuList, Icon } from './styles'; | |
| export default function ReactSelect({ | |
| 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
| import React, { useEffect, useState } from 'react'; | |
| import { Fade } from './styles'; | |
| export default function FadeComponent({ show, children }) { | |
| const [render, setRender] = useState(show); | |
| useEffect(() => { | |
| if (show) setRender(true); | |
| }, [show]); |
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
| [ | |
| { | |
| "key": "alt+1", | |
| "command": "extension.runJestFile", | |
| }, | |
| { | |
| "key": "alt+2", | |
| "command": "extension.runJest", | |
| }, | |
| { |
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 to connect | |
| const initLoad = useCallback(async () => { | |
| if (!info) return history.push(commom.CONFIG_ERROR); | |
| const room1 = await connect(info.joinInfo.attendee.jwtToken, { | |
| video: { deviceId: videoInputDevice }, | |
| audio: { deviceId: audioInputDevice }, | |
| name: info.meetingId, | |
| networkQuality: { | |
| local: 2, | |
| remote: 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 { setup } from 'axios-cache-adapter'; | |
| import localforage from 'localforage'; | |
| import memoryDriver from 'localforage-memoryStorageDriver'; | |
| import { getURLCached } from './cache'; | |
| localforage.defineDriver(memoryDriver); | |
| const localforageStore = localforage.createInstance({ | |
| driver: [localforage.LOCALSTORAGE, localforage.INDEXEDDB], | |
| name: 'NOME_QUE APARECE_NO_LOCALSTORAGE', |