├── public ├── _redirects ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── src ├── images │ ├── aboutimg.png │ ├── homebg.jpg │ ├── navlogo.png │ ├── tvshow1.jpeg │ ├── tvshow2.jpg │ ├── interface1.PNG │ ├── interface2.PNG │ ├── interface3.PNG │ └── interface4.PNG ├── redux │ ├── actions │ │ ├── filterAction.js │ │ ├── type.js │ │ └── allactions.js │ ├── reducers │ │ ├── index.js │ │ ├── filterReducer.js │ │ └── showsReducer.js │ └── store.js ├── __test__ │ ├── components │ │ ├── __snapshots__ │ │ │ ├── Filter.test.js.snap │ │ │ ├── Footer.test.js.snap │ │ │ ├── About.test.js.snap │ │ │ ├── Home.test.js.snap │ │ │ └── Navbar.test.js.snap │ │ ├── Loading.test.js │ │ ├── About.test.js │ │ ├── Navbar.test.js │ │ ├── Footer.test.js │ │ ├── Home.test.js │ │ └── Filter.test.js │ ├── App.test.js │ ├── reducers │ │ ├── filterReducer.test.js │ │ └── showsReducer.test.js │ └── __snapshots__ │ │ └── App.test.js.snap ├── components │ ├── Footer.js │ ├── loading.js │ ├── Filter.js │ ├── About.js │ ├── Home.js │ ├── Showitem.js │ └── Navbar.js ├── index.js ├── App.js ├── containers │ ├── Showlist.js │ └── Showinfo.js └── index.css ├── .stylelintrc.json ├── .gitignore ├── .eslintrc.json ├── .github └── workflows │ └── linters.yml ├── package.json └── README.md /public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/images/aboutimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/aboutimg.png -------------------------------------------------------------------------------- /src/images/homebg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/homebg.jpg -------------------------------------------------------------------------------- /src/images/navlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/navlogo.png -------------------------------------------------------------------------------- /src/images/tvshow1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/tvshow1.jpeg -------------------------------------------------------------------------------- /src/images/tvshow2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/tvshow2.jpg -------------------------------------------------------------------------------- /src/images/interface1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/interface1.PNG -------------------------------------------------------------------------------- /src/images/interface2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/interface2.PNG -------------------------------------------------------------------------------- /src/images/interface3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/interface3.PNG -------------------------------------------------------------------------------- /src/images/interface4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkacca457/react_capstone_tvshowcatalouge/HEAD/src/images/interface4.PNG -------------------------------------------------------------------------------- /src/redux/actions/filterAction.js: -------------------------------------------------------------------------------- 1 | export const CHANGE_FILTER = 'CHANGE_FILTER'; 2 | 3 | export const changeFilter = filter => ({ 4 | type: CHANGE_FILTER, 5 | payload: filter, 6 | }); 7 | -------------------------------------------------------------------------------- /src/__test__/components/__snapshots__/Filter.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Filter component renders the form-control in the page 1`] = `ShallowWrapper {}`; 4 | -------------------------------------------------------------------------------- /src/components/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Footer = () => ( 4 |
5 |

© & Project made by Avijit, Microverse

6 |
7 | ); 8 | 9 | export default Footer; 10 | -------------------------------------------------------------------------------- /src/redux/actions/type.js: -------------------------------------------------------------------------------- 1 | export const FETCH_SHOWS_REQUEST = 'FETCH_SHOWS_REQUEST'; 2 | export const FETCH_SHOWS_SUCCESS = 'FETCH_SHOWS_SUCCESS'; 3 | export const FETCH_SHOWS_FAILURE = 'FETCH_SHOWS_FAILURE'; 4 | export const FETCH_SHOW_SUCCESS = 'FETCH_SHOW_SUCCESS'; 5 | -------------------------------------------------------------------------------- /src/__test__/components/__snapshots__/Footer.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Footer Component renders correctly 1`] = ` 4 |
7 |

8 | © & Project made by Avijit, Microverse 9 |

10 |
11 | `; 12 | -------------------------------------------------------------------------------- /src/redux/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import showsReducer from './showsReducer'; 3 | import filterReducer from './filterReducer'; 4 | 5 | const rootReducer = combineReducers({ 6 | shows: showsReducer, 7 | filter: filterReducer, 8 | 9 | }); 10 | 11 | export default rootReducer; 12 | -------------------------------------------------------------------------------- /src/redux/store.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import { composeWithDevTools } from 'redux-devtools-extension'; 4 | import rootReducer from './reducers/index'; 5 | 6 | const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk))); 7 | 8 | export default store; 9 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["stylelint-config-standard"], 3 | "plugins": ["stylelint-scss", "stylelint-csstree-validator"], 4 | "rules": { 5 | "at-rule-no-unknown": null, 6 | "scss/at-rule-no-unknown": true, 7 | "csstree/validator": true 8 | }, 9 | "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"] 10 | } 11 | -------------------------------------------------------------------------------- /src/components/loading.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import GridLoader from 'react-spinners/GridLoader'; 3 | 4 | const Loading = () => ( 5 |
6 |
7 | 8 |

Loading Shows ....

9 |
10 |
11 | ); 12 | 13 | export default Loading; 14 | -------------------------------------------------------------------------------- /src/__test__/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TestRenderer from 'react-test-renderer'; 3 | import '@testing-library/jest-dom/extend-expect'; 4 | import App from '../App'; 5 | 6 | describe('App Component', () => { 7 | it('renders correctly', () => { 8 | const apptree = TestRenderer 9 | .create() 10 | .toJSON(); 11 | expect(apptree).toMatchSnapshot(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/redux/reducers/filterReducer.js: -------------------------------------------------------------------------------- 1 | import { CHANGE_FILTER } from '../actions/filterAction'; 2 | 3 | export const initialstate = { 4 | filter: '', 5 | }; 6 | 7 | const filterReducer = (state = initialstate, action) => { 8 | switch (action.type) { 9 | case CHANGE_FILTER: 10 | return { 11 | filter: action.payload, 12 | }; 13 | default: return state; 14 | } 15 | }; 16 | 17 | export default filterReducer; 18 | -------------------------------------------------------------------------------- /src/components/Filter.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const Filter = ({ changeFilter }) => ( 5 |
6 | changeFilter(e.target.value)} 11 | /> 12 |
13 | ); 14 | 15 | Filter.propTypes = { 16 | changeFilter: PropTypes.func.isRequired, 17 | }; 18 | 19 | export default Filter; 20 | -------------------------------------------------------------------------------- /src/__test__/components/Loading.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import '@testing-library/jest-dom/extend-expect'; 4 | import Loading from '../../components/loading'; 5 | 6 | describe('Loading Component', () => { 7 | test('renders the title text of Loading Component', () => { 8 | const { getByText } = render(); 9 | const title = getByText('Loading Shows ....'); 10 | expect(title).toBeInTheDocument(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/__test__/reducers/filterReducer.test.js: -------------------------------------------------------------------------------- 1 | import filterReducer, { initialstate } from '../../redux/reducers/filterReducer'; 2 | 3 | test('initialState to be as expected', () => { 4 | expect(initialstate).toEqual({ 5 | filter: '', 6 | }); 7 | }); 8 | 9 | test('filterReducer doesn\'t change filter when given wrong action ', () => { 10 | const action = { 11 | type: 'blah', 12 | filter: 'hello', 13 | }; 14 | expect(filterReducer(initialstate, action)).not.toEqual({ 15 | ...initialstate, 16 | filter: 'hello', 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import 'bootstrap/dist/css/bootstrap.min.css'; 5 | import 'bootstrap/dist/js/bootstrap.bundle.min'; 6 | import '@fortawesome/fontawesome-free/css/all.min.css'; 7 | import { Provider } from 'react-redux'; 8 | import store from './redux/store'; 9 | import App from './App'; 10 | 11 | ReactDOM.render( 12 | 13 | 14 | 15 | 16 | 17 | , 18 | 19 | document.getElementById('root'), 20 | ); 21 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/__test__/components/About.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TestRenderer from 'react-test-renderer'; 3 | import { render } from '@testing-library/react'; 4 | import '@testing-library/jest-dom/extend-expect'; 5 | import About from '../../components/About'; 6 | 7 | describe('About Component', () => { 8 | it('renders correctly', () => { 9 | const quotetree = TestRenderer 10 | .create() 11 | .toJSON(); 12 | expect(quotetree).toMatchSnapshot(); 13 | }); 14 | 15 | test('renders the title text of About page', () => { 16 | const { getByText } = render(); 17 | const title = getByText('About TVWORLD'); 18 | expect(title).toBeInTheDocument(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "jest": true 6 | }, 7 | "parser": "babel-eslint", 8 | "parserOptions": { 9 | "ecmaFeatures": { 10 | "jsx": true 11 | }, 12 | "ecmaVersion": 2018, 13 | "sourceType": "module" 14 | }, 15 | "extends": ["airbnb", "plugin:react/recommended"], 16 | "plugins": ["react"], 17 | "rules": { 18 | "react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }], 19 | "react/react-in-jsx-scope": "off", 20 | "import/no-unresolved": "off", 21 | "no-shadow": "off", 22 | "arrow-parens": ["error", "as-needed"] 23 | }, 24 | "ignorePatterns": [ 25 | "dist/", 26 | "build/" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /src/__test__/components/Navbar.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { BrowserRouter } from 'react-router-dom'; 3 | import TestRenderer from 'react-test-renderer'; 4 | import '@testing-library/jest-dom/extend-expect'; 5 | import Navbar from '../../components/Navbar'; 6 | 7 | describe('Navbar Component', () => { 8 | it('renders correctly', () => { 9 | const navtree = TestRenderer 10 | .create( 11 | /* eslint-disable no-unused-vars */ 12 | 13 | {' '} 14 | 15 | {' '} 16 | , 17 | ) 18 | .toJSON(); 19 | /* eslint-enable no-unused-vars */ 20 | expect(navtree).toMatchSnapshot(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /src/__test__/components/Footer.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TestRenderer from 'react-test-renderer'; 3 | import { render } from '@testing-library/react'; 4 | import '@testing-library/jest-dom/extend-expect'; 5 | import Footer from '../../components/Footer'; 6 | 7 | describe('Footer Component', () => { 8 | it('renders correctly', () => { 9 | const quotetree = TestRenderer 10 | .create(