Skip to content

Commit

Permalink
Fetch commits from GitHub API
Browse files Browse the repository at this point in the history
  • Loading branch information
haruelrovix committed Dec 12, 2018
1 parent 0cf995b commit 334197c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.2",
"fetch-hoc": "^0.5.0",
"file-loader": "1.1.5",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
Expand All @@ -56,6 +57,7 @@
"react-native-web": "0.8.4",
"react-router-dom": "^4.3.1",
"react-router-native": "^4.3.0",
"redux": "^4.0.1",
"resolve": "1.6.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Commit/CommitList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { Text, View } from 'react-native';
import { compose } from 'redux';
import fetch from 'fetch-hoc';

import styles from '../Shared.style';
import withHeader from '../../HOCs/withHeader';
Expand All @@ -10,4 +12,7 @@ const CommitList = () => (
</View>
);

export default withHeader({ title: 'Commits' })(CommitList);
export default compose(
fetch('https://api.github.com/repos/react-native-training/react-native-elements/commits'),
withHeader({ title: 'Commits' })
)(CommitList);
20 changes: 19 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3555,6 +3555,11 @@ fbjs@^0.8.14, fbjs@^0.8.16, fbjs@^0.8.9:
setimmediate "^1.0.5"
ua-parser-js "^0.7.18"

fetch-hoc@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/fetch-hoc/-/fetch-hoc-0.5.0.tgz#ef6aba4c12ba342198f63c9acc208d3ce5005eb8"
integrity sha512-R2F+t8s1CrkMFfCCqjDwIAYxplqu3k/Nwfw/+tA81g2EkzRD1Y9TMDHP50oZKn2dwmzt258UwJxXrbGA+9igBg==

figures@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
Expand Down Expand Up @@ -5435,7 +5440,7 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1:
dependencies:
js-tokens "^3.0.0"

loose-envify@^1.2.0:
loose-envify@^1.2.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
Expand Down Expand Up @@ -7298,6 +7303,14 @@ reduce-function-call@^1.0.1:
dependencies:
balanced-match "^0.4.2"

redux@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.1.tgz#436cae6cc40fbe4727689d7c8fae44808f1bfef5"
integrity sha512-R7bAtSkk7nY6O/OYMVR9RiBI+XghjF9rlbl5806HJbQph0LJVHZrU5oaO4q70eUKiqMRqm4y07KLTlMZ2BlVmg==
dependencies:
loose-envify "^1.4.0"
symbol-observable "^1.2.0"

regenerate@^1.2.1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
Expand Down Expand Up @@ -8143,6 +8156,11 @@ sw-toolbox@^3.4.0:
path-to-regexp "^1.0.1"
serviceworker-cache-polyfill "^4.0.0"

symbol-observable@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==

symbol-tree@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
Expand Down

0 comments on commit 334197c

Please sign in to comment.