Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desafio Front de End - Rodrigo Andrade #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
1 change: 1 addition & 0 deletions .eslintcache

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/*.js
node_modules
build
/src/react-app-env.d.ts
/src/reportWebVitals.ts
/*.js
53 changes: 53 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-hooks", "prettier"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"import/prefer-default-export": "off",
"camelcase": "off",
"@typescript-eslint/ban-types": "off",
"react/jsx-props-no-spreading": "off",
"no-use-before-define": "off",
"prettier/prettier": "error",
"react/prop-types": "off",
"react/require-default-props": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",{
"allowExpressions": true
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
34 changes: 34 additions & 0 deletions READMECLUBPETRO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Instruções

Dentro do diretório do projeto execute

### yarn

Para instalar as dependências

Dentro do diretório do projeto execute o JSON-SERVER como o comando:

### `yarn json-server server.json -p 3333`

Em outro terminal, execute para executar o projeto:

### `yarn start`

Abra [http://localhost:3000](http://localhost:3000) para ver no browser.

![alt](https://user-images.githubusercontent.com/3511851/104784161-75d36100-5766-11eb-87da-210a63198f89.png)

## 🔨 Ferramentas Utilizadas
### - ReactJs
### - Typescript
### - EsLint
### - Prettier
### - Axios
### - Json Server
### - Styled-Components
### - React-Router-Dom
### - React Spring
### - Unform
### - React Icons


4 changes: 4 additions & 0 deletions debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[0111/232250.046:ERROR:directory_reader_win.cc(43)] FindFirstFile: O sistema n�o pode encontrar o caminho especificado. (0x3)
[0112/105526.735:ERROR:directory_reader_win.cc(43)] FindFirstFile: O sistema n�o pode encontrar o caminho especificado. (0x3)
[0114/113902.064:ERROR:directory_reader_win.cc(43)] FindFirstFile: O sistema n�o pode encontrar o caminho especificado. (0x3)
[0115/103232.879:ERROR:directory_reader_win.cc(43)] FindFirstFile: O sistema n�o pode encontrar o caminho especificado. (0x3)
73 changes: 73 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"name": "desafio-clubpreto",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/jest": "^26.0.15",
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^16.9.8",
"@unform/core": "^2.1.3",
"@unform/web": "^2.1.3",
"axios": "^0.21.1",
"json-server": "^0.16.3",
"polished": "^4.0.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-icons": "^4.1.0",
"react-input-mask": "^2.0.4",
"react-modal": "^3.12.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-spring": "^8.0.27",
"styled-components": "^5.2.1",
"typescript": "^4.0.3",
"uuidv4": "^6.2.6",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/react-input-mask": "^3.0.0",
"@types/react-modal": "^3.10.6",
"@types/react-router-dom": "^5.1.7",
"@types/styled-components": "^5.1.7",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"eslint": "^7.17.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^7.1.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.3.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "7.20.0",
"eslint-plugin-react-hooks": "4",
"prettier": "2.2.1"
}
}
5 changes: 5 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
}
22 changes: 22 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#ffffff" />
<meta
name="description"
content="Web site created using create-react-app"
/>

<title>ClubPetro</title>

<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

</body>
</html>
3 changes: 3 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
84 changes: 84 additions & 0 deletions server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"add": [
{
"name": "Argentina",
"local": "Buenos Aires",
"meta": "06/2021",
"flag": "https://restcountries.eu/data/arg.svg",
"translation": "Argentina",
"id": 16
},
{
"name": "Bolivia (Plurinational State of)",
"local": "Salar de Uyuni",
"meta": "04/2023",
"flag": "https://restcountries.eu/data/bol.svg",
"translation": "Bolívia",
"id": 17
},
{
"name": "Brazil",
"local": "Balneário Camboriu",
"meta": "07/2026",
"flag": "https://restcountries.eu/data/bra.svg",
"translation": "Brasil",
"id": 26
},
{
"name": "Italy",
"local": "Veneza",
"meta": "09/2027",
"flag": "https://restcountries.eu/data/ita.svg",
"translation": "Itália",
"id": 28
},
{
"name": "United States of America",
"local": "Disney",
"meta": "09/2028",
"flag": "https://restcountries.eu/data/usa.svg",
"translation": "Estados Unidos",
"id": 29
},
{
"name": "United States of America",
"local": "Nova York",
"meta": "05/2032",
"flag": "https://restcountries.eu/data/usa.svg",
"translation": "Estados Unidos",
"id": 30
},
{
"name": "United Arab Emirates",
"local": "Dubai",
"meta": "01/2033",
"flag": "https://restcountries.eu/data/are.svg",
"translation": "Emirados árabes Unidos",
"id": 31
},
{
"name": "Peru",
"local": "Machu Picchu",
"meta": "04/2034",
"flag": "https://restcountries.eu/data/per.svg",
"translation": "Peru",
"id": 32
},
{
"name": "Italy",
"local": "Roma",
"meta": "08/2037",
"flag": "https://restcountries.eu/data/ita.svg",
"translation": "Itália",
"id": 33
},
{
"name": "Brazil",
"local": "Rio de Janeiro",
"meta": "05/2040",
"flag": "https://restcountries.eu/data/bra.svg",
"translation": "Brasil",
"id": 34
}
]
}
19 changes: 19 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import Routes from './routes';
import GlobalStyle from './styles/global';

import AppProvider from './hooks';

const App: React.FC = () => (
<>
<BrowserRouter>
<AppProvider>
<Routes />
</AppProvider>
</BrowserRouter>
<GlobalStyle />
</>
);

export default App;
9 changes: 9 additions & 0 deletions src/assets/brasil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/logoclubpetro.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading