Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
4b4c1d9
Add react-redux, redux to dependencies. Also add eslint to dev depend…
ViriCruz Apr 22, 2020
4e0b23a
Add gitignore configuration file
ViriCruz Apr 22, 2020
574ab25
Add README.md file
ViriCruz Apr 22, 2020
a8d819c
Add initial files to run react app
ViriCruz Apr 22, 2020
35b5618
Add presentational components
ViriCruz Apr 23, 2020
e953c1b
Add container components
ViriCruz Apr 23, 2020
0b59eb6
Add Catalogue component to render function
ViriCruz Apr 23, 2020
6ce5cdd
Add empty unordered list to render function
ViriCruz Apr 23, 2020
eed8b00
Add App component to render function
ViriCruz Apr 23, 2020
43dd312
Add fetch pokemons pending, fetch pokemons success and fetch pokemons…
ViriCruz Apr 23, 2020
f0c0509
Add api call function
ViriCruz Apr 23, 2020
a9ccded
Add pokemon reducer and root reducer
ViriCruz Apr 23, 2020
55dbe9b
Add Provider component to connect redux store
ViriCruz Apr 23, 2020
04111d1
Add redux thunk
ViriCruz Apr 23, 2020
1f6b77b
Add async functions to retrieve a list of pokemons and another functi…
ViriCruz Apr 23, 2020
06f21da
Add redux thunk to middlewares in createStore
ViriCruz Apr 23, 2020
d4759ae
Refactor function to an arrow function
ViriCruz Apr 23, 2020
413d13c
Add componentDidMount to fetch api data and render list of pokemons
ViriCruz Apr 23, 2020
e4467e3
Add default image for every item
ViriCruz Apr 24, 2020
a53d0e8
Add custom css and reset css
ViriCruz Apr 24, 2020
5c182fe
Add react-router-dom to dependencies
ViriCruz Apr 24, 2020
c3ab467
Add Router and Switch to render a specific component
ViriCruz Apr 24, 2020
7aef476
Add basic information of pokemon
ViriCruz Apr 24, 2020
9b3e464
Add Link to render pokemon detailed view
ViriCruz Apr 24, 2020
8530ea0
Add actions for fetching a single pokemon
ViriCruz Apr 24, 2020
b5f67f7
Add function to fetch pokemon from API
ViriCruz Apr 24, 2020
7dbd76e
Add Switch to render either Catalogue or DetailedView component
ViriCruz Apr 24, 2020
2304637
Add compact view for pokemon in catalogue
ViriCruz Apr 24, 2020
57989f9
Add pokemon detailed view
ViriCruz Apr 24, 2020
b0ac976
Add pokemon compact view component to render on list
ViriCruz Apr 24, 2020
57fc639
Add react-router as a dependency
ViriCruz Apr 24, 2020
c573e5a
Rename pokemon function to pokemonProps
ViriCruz Apr 24, 2020
169f2bb
Add cases for fetching a single pokemon
ViriCruz Apr 24, 2020
d222154
Add mapState and mapDispatch to props on DetailedView component
ViriCruz Apr 24, 2020
aa635bd
Add useHistory hook
ViriCruz Apr 24, 2020
34b17b7
Add bootstrap to dependencies
ViriCruz Apr 25, 2020
637be8b
Add category filter component and filter reducer to filter by pokemon…
ViriCruz Apr 25, 2020
c22e443
Add filter pokemon type
ViriCruz Apr 25, 2020
8608178
Add bootstrap
ViriCruz Apr 25, 2020
49a74b2
Add filter reducer to root reducer
ViriCruz Apr 25, 2020
26592fa
Add select dropdown to filter by pokemon type
ViriCruz Apr 25, 2020
fbfad94
Add validation for empty data and add props validation
ViriCruz Apr 25, 2020
be238b8
Add props type validation
ViriCruz Apr 25, 2020
2968606
Add eslint config files
ViriCruz Apr 25, 2020
bc89434
Add bootstrap classes to components.Also add custom css
ViriCruz Apr 25, 2020
8cf571f
Add value selected to category filter component
ViriCruz Apr 25, 2020
7cdfe41
Change default image
ViriCruz Apr 25, 2020
a0a6c04
Modify spinner width and height
ViriCruz Apr 25, 2020
9bb15eb
Add spinner loading
ViriCruz Apr 25, 2020
a28eb61
Fix linter errors
ViriCruz Apr 25, 2020
6d982e5
Update README
ViriCruz Apr 25, 2020
5c01877
Add babel config
ViriCruz Apr 29, 2020
392e07a
Add jest, @babel/core and @babel/preset-env to dependencies
ViriCruz Apr 29, 2020
ed61536
Rename snake-case filenames to camelCase filenames
ViriCruz Apr 29, 2020
2d1e145
Add return statement when error occurs
ViriCruz Apr 29, 2020
0021b4d
Add unit tests for fetchPokemons.js
ViriCruz Apr 29, 2020
3ce1873
Fix import errors
ViriCruz Apr 29, 2020
60a5865
Add fetch-mock to dependencies
ViriCruz Apr 30, 2020
a9b12fc
Add unit test for async action creators
ViriCruz Apr 30, 2020
75b579d
Refactor index.test.js
ViriCruz May 4, 2020
7344d43
Add setupTest file configuration to work with enzyme and add unit tes…
ViriCruz May 4, 2020
29b14fe
Add tests for error, pending and fetched data states
ViriCruz May 5, 2020
2aa6291
Add verbose and colors flags to test script
ViriCruz May 5, 2020
ee9d10a
Refactor mockFetchPokemonsfn to mockFetchPokemonsFn
ViriCruz May 5, 2020
70a244d
Change #error to .error in test #renders error when fetching fails
ViriCruz May 5, 2020
d4af31a
Add unit tests that checks proper render and event handler
ViriCruz May 5, 2020
b6976c4
Add default value for sprites prop
ViriCruz May 5, 2020
b9a3943
Refactor id='error' to className='error'
ViriCruz May 5, 2020
28f21ac
Export DetailedView component without connect decorator
ViriCruz May 5, 2020
d8990a7
Add unit and integration test to DetailedView component without the r…
ViriCruz May 5, 2020
7502758
Add unit tests for itemDetailedView component
ViriCruz May 5, 2020
ec0590c
Relocate fetchPokemons.test.js to api folder
ViriCruz May 5, 2020
4272878
Relocate enzyme from dev dependencies to dependencies
ViriCruz May 5, 2020
bf8bc2f
Fix linter errors
ViriCruz May 5, 2020
bbf386c
Update package-lock.json
ViriCruz May 5, 2020
9f5f0d9
Change favicon icon
ViriCruz May 6, 2020
da95564
Update README.md
ViriCruz May 6, 2020
2c31804
Update README.md
ViriCruz May 6, 2020
aac76c4
Update README.md
ViriCruz May 6, 2020
8124736
Update README.md
ViriCruz May 6, 2020
769d0b8
Update README.md
ViriCruz May 6, 2020
de4b593
Update README.md
ViriCruz Jun 23, 2020
07de2b8
Refactor fetchPokemons function to show image along with the name
ViriCruz Jul 3, 2020
6de419a
Add flex bootstrap classes to itemCompactView to center items
ViriCruz Jul 3, 2020
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
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"],
}
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb", "plugin:react/recommended"],
"plugins": ["react"],
"rules": {
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
"import/no-unresolved": "off",
"no-shadow": "off",
"arrow-parens": ["error", "as-needed"]
}
}
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*
10 changes: 10 additions & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# add the linters you want stickler to use for this project
linters:
eslint:
# indicate where is the config file for stylelint
config: './.eslintrc.json'

# PLEASE DO NOT enable auto fixing options
# if you need extra support from you linter - do it in your local env as described in README for this config

# find full documentation here: https://stickler-ci.com/docs
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]

# Basic catalog with React
This project is a basic pokemon catalog that has a browsable list of pokemon, depending on the pokemon type that you select. Also, you can check in more detail if you click on a pokemon.

[![](https://i.imgur.com/W4p5uMu.png)](https://drive.google.com/file/d/1_VbEV0ZjVnuLhfl1C8AjJhTsD8z6yyI-/view?usp=sharing)


## Demo down below
Visit [Pokemon Catalog](https://pokemon-catalogue.herokuapp.com/) to try the live version.

## Built With ✨
- React 16.13
- react-router 5.1
- react-router-dom 5.1
- create-react-app
- JavaScript ES6


## Prerequisites
* Node.js installed
You will need Node.js up to v8

* System dependencies
Windows/ Mac


## Install
Clone project and run:
`npm install`
`npm start`

This will launch the project on **localhost:3000**


### How to use
Browse the list of pokemon, every time you want to see more details of pokemon in specific, just click on the pokemon. To filter pokemon by type, just select a category from the select dropdown above the pokemon's list.



## How to contribute and participate
Fork this repo and submit a PR for review and potential merge to the main branch. Feel free to leave feedback. :smile:

## How to run tests
If you want to use npm, run:
`npm test`

If you want yo use yarn, run:
`yarn test`

## Authors

👨‍💻 **Gabriela Cruz**

- Github [@viricruz](https://github.com/ViriCruz/)

- email me at [email protected]

- LinkedIn [@viricruz](https://www.linkedin.com/in/viricruz/)

## License

This project is [MIT](LICENSE) licensed.

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

[contributors-shield]: https://img.shields.io/github/contributors/viricruz/basic-catalogue-react.svg?style=flat-square
[contributors-url]: https://github.com/viricruz/basic-catalogue-react/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/viricruz/basic-catalogue-react
[forks-url]: https://github.com/viricruz/basic-catalogue-react/network/members
[stars-shield]: https://img.shields.io/github/stars/viricruz/basic-catalogue-react
[stars-url]: https://github.com/viricruz/basic-catalogue-react/stargazers
[issues-shield]: https://img.shields.io/github/issues/viricruz/basic-catalogue-react
[issues-url]: https://github.com/viricruz/basic-catalogue-react/issues
[license-shield]: https://img.shields.io/github/license/viricruz/basic-catalogue-react
[license-url]: https://github.com/viricruz/basic-catalogue-react/blob/master/LICENSE.txt
Loading