import { HttpClient, HttpStatusCode } from '@/data/protocols'
import { InvalidCredentialError, UnexpectedError } from '@/domain/errors'
import { LoginUsecase } from '@/domain/usecases'
export class RemoteLogin implements LoginUsecase {
constructor (
private readonly url: string,
private readonly httpClient: HttpClient
import { HttpClient, HttpStatusCode } from '@/data/protocols'
import { InvalidCredentialError, UnexpectedError } from '@/domain/errors'
import { LoginUsecase } from '@/domain/usecases'
export class RemoteLogin implements LoginUsecase {
constructor (
private readonly url: string,
private readonly httpClient: HttpClient
This file contains 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
{ | |
"name": "Thiago", | |
"email": "thiagobutignon@gmail.com" | |
} |
This file contains 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
{ | |
"_beagleComponent_": "beagle:container", | |
"style": { | |
"backgroundColor": "#FF0000", | |
"padding": { | |
"all": { | |
"value": 60, | |
"type": "REAL" | |
} | |
} |
This file contains 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 faker from 'faker' | |
import { AddAccount } from '@/domain/usecases' | |
import { mockAccountResultModel } from '@/domain/test' | |
export const mockAddAccountParams = (): AddAccount.Params => { | |
const password = faker.internet.password() | |
return { | |
fullName: faker.name.findName(), | |
username: faker.internet.userName(), | |
email: faker.internet.email(), |
This file contains 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 { Router } from 'react-router-dom' | |
import { createMemoryHistory } from 'history' | |
import faker from 'faker' | |
import { | |
render, | |
RenderResult, | |
fireEvent, | |
cleanup, | |
waitFor |
This file contains 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 Foundation | |
struct Character: Model { | |
let id: Int | |
let name, resultDescription: String | |
let modified: Date | |
let thumbnail: Image | |
let resourceURI: String | |
let comics, series: ComicsList | |
let stories: StoryList |
This file contains 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
{touched.zipcode && !errors.zipcode | |
? setTimeout(() => { | |
cep(values.zipcode) | |
.then(response => { | |
setFieldTouched('zipcode', false); | |
console.log(response); | |
setFieldValue('street', response.street); | |
setFieldValue('city', response.city); | |
setFieldValue('state', response.state); | |
setFieldValue('neighborhood', response.neighborhood); |
This file contains 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 { IoIosPin, IoMdHome } from 'react-icons/io'; | |
import { TiSortNumerically } from 'react-icons/ti'; | |
import { FaBuilding } from 'react-icons/fa'; | |
import { Form, InputGroup, FormControl } from 'react-bootstrap'; | |
import { Formik, FormikProps } from 'formik'; | |
import cep from 'cep-promise'; |
NewerOlder