Repository: LarissaAbreu/contrata-se-dev Branch: master Commit: 8180650b44aa Files: 14 Total size: 15.9 KB Directory structure: gitextract_5xcr95ty/ ├── .gitignore ├── CNAME ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── package.json ├── src/ │ ├── assets/ │ │ ├── scripts/ │ │ │ ├── App.js │ │ │ ├── components/ │ │ │ │ ├── Card.js │ │ │ │ ├── Label.js │ │ │ │ └── SelectLabel.js │ │ │ └── index.js │ │ └── styles/ │ │ └── style.css │ └── index.html └── webpack.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store desktop.ini icon npm-debug.log node_modules/ dist/ yarn-error.log .out/ ================================================ FILE: CNAME ================================================ contrata-se.dev ================================================ FILE: CONTRIBUTING.md ================================================ # Contribuição 1. Fork o projeto! 2. Crie sua feature branch: `git checkout -b my-new-feature` 3. Commit suas alterações: `git commit -m 'Add some feature'` 4. Suba sua branch: `git push origin my-new-feature` 5. Envie um pull request **Depois que seu pull requeste for mergeado** Depois que seu pull request for mergeado você pode deletar sua branch. ## Atenção: É importante tentar manter o padrão de desenvolvimento que está sendo seguido no projeto e sempre tentar fazer o seu código de uma maneira que seja escalável e manutenível. ### [<-- Voltar](https://github.com/LarissaAbreu/contrata-se-dev) ================================================ FILE: LICENSE.md ================================================ Copyright (c) 2019 Larissa Abreu, [afonsopacifer.com](http://afonsopacifer.com/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Contrata-se.dev > Agregador de vagas para pessoas desenvolvedoras :) ## Rodando o projeto localmente **1 -** Clone o projeto e instale as dependêcias: ```sh $ git clone https://github.com/LarissaAbreu/contrata-se-dev.git $ cd contrata-se-dev $ yarn ``` **3 -** Rode o servidor estático com livereload: ```sh $ yarn start ``` ## Versionamento Para manter uma melhor organização, seguiremos as diretrizes do [Versionamento Semântico 2.0.0](http://semver.org/). ## Contribuição Veja no [guia](https://github.com/LarissaAbreu/contrata-se-dev/issues) os próximos passos do projeto ;)
Quer contrinuir? [Siga essas recomendações](https://github.com/LarissaAbreu/contrata-se-dev/blob/master/CONTRIBUTING.md). ## Licença [Licença MIT](https://github.com/LarissaAbreu/contrata-se-dev/blob/master/LICENSE.md) © [Larissa Abreu](http://larissaabreu.github.io/), [Afonso Pacifer](https://afonsopacifer.github.io/) ================================================ FILE: package.json ================================================ { "name": "contrata-se-dev", "version": "0.1.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "./node_modules/.bin/webpack-dev-server", "build": "./node_modules/.bin/webpack", "deploy": "gh-pages-deploy" }, "repository": { "type": "git", "url": "git+https://github.com/LarissaAbreu/contrata-se-dev.git" }, "author": "Larissa Abreu, Afonso Pacifer", "license": "MIT", "bugs": { "url": "https://github.com/LarissaAbreu/contrata-se-dev/issues" }, "homepage": "https://github.com/LarissaAbreu/contrata-se-dev#readme", "dependencies": { "react": "^16.8.1", "react-dom": "^16.8.1", "react-select": "^3.1.1", "tinycolor2": "^1.4.1" }, "devDependencies": { "@babel/core": "^7.2.2", "@babel/preset-env": "^7.3.1", "@babel/preset-react": "^7.0.0", "babel-loader": "^8.0.5", "copy-webpack-plugin": "^4.6.0", "css-loader": "^2.1.0", "style-loader": "^0.23.1", "svg-react-loader": "^0.4.6", "webpack": "^4.29.3", "webpack-cli": "^3.2.3", "webpack-dev-server": "^3.1.14" }, "gh-pages-deploy": { "staticpath": "dist", "cname": "contrata-se.dev" } } ================================================ FILE: src/assets/scripts/App.js ================================================ import React, { useState, useEffect } from 'react'; import '../styles/style.css'; import Card from './components/Card'; import Label from './components/Label'; import SelectLabel from './components/SelectLabel'; const App = () => { const [issues, setIssues] = useState([]); const [pages, setPages] = useState(1); const [filteredLabels, setFilteredLabels] = useState([]); useEffect(() => { fetch(`https://api.github.com/repos/frontendbr/vagas/issues?state=open&page=1&labels=${_formateLabelsQuery(filteredLabels)}`) .then((res) => res.json()) .then((json) => setIssues(json)); }, [filteredLabels]); const formateDate = (date) => { const dateSplit = date.split('T'); const ymd = dateSplit[0].split('-'); return `${ymd[2]}/${ymd[1]}/${ymd[0]}`; }; const _formateLabelsQuery = (labels) => { const valueLabel = (Array.isArray(labels) ? labels : []).map((label) => label.value); return valueLabel.join(','); }; const _showMore = () => { fetch(`https://api.github.com/repos/frontendbr/vagas/issues?state=open&page=${pages + 1}&labels=${_formateLabelsQuery(filteredLabels)}`) .then((res) => res.json()) .then((json) => { setIssues([...issues, ...json]); setPages(pages + 1); }); }; const $issues = issues.map((issue, i) => { if (!issue.pull_request) { const date = formateDate(issue.created_at); const $labels = issue.labels.map((label, i) => { return (