├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── .babelrc ├── src ├── App.css ├── component │ ├── books.js │ ├── Navbar.js │ ├── category.js │ ├── form.js │ ├── book.js │ └── books.css ├── redux │ ├── configStore.js │ ├── categories │ │ └── categories.js │ └── books │ │ └── books.js ├── index.js ├── index.css ├── App.js └── API │ └── bookapi.js ├── .gitignore ├── .hintrc ├── .stylelintrc.json ├── .eslintrc.json ├── README.md ├── package.json └── .github └── workflows └── linters.yml /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Basir-Mohammadi/book-store-react/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Basir-Mohammadi/book-store-react/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Basir-Mohammadi/book-store-react/HEAD/public/logo512.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-react" 4 | ], 5 | "plugins": ["@babel/plugin-syntax-jsx"] 6 | } -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | text-decoration: none; 5 | } 6 | 7 | #root { 8 | background: #e6e6e6; 9 | height: 100vh; 10 | } 11 | -------------------------------------------------------------------------------- /src/component/books.js: -------------------------------------------------------------------------------- 1 | import Form from './form'; 2 | import Book from './book'; 3 | 4 | const Books = () => ( 5 |
6 | 7 |
8 |
9 | ); 10 | 11 | export default Books; 12 | -------------------------------------------------------------------------------- /src/redux/configStore.js: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit'; 2 | import booksReducer from './books/books'; 3 | import categoriesReducer from './categories/categories'; 4 | 5 | const store = configureStore({ 6 | reducer: { 7 | bookStore: booksReducer, 8 | categoriesReducer, 9 | }, 10 | }); 11 | 12 | export default store; 13 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "connector": { 3 | "name": "local", 4 | "options": { 5 | "pattern": ["**", "!.git/**", "!node_modules/**"] 6 | } 7 | }, 8 | "extends": ["development"], 9 | "formatters": ["stylish"], 10 | "hints": [ 11 | "button-type", 12 | "disown-opener", 13 | "html-checker", 14 | "meta-charset-utf-8", 15 | "meta-viewport", 16 | "no-inline-styles:error" 17 | ] 18 | } -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import { Provider } from 'react-redux'; 5 | import App from './App'; 6 | import store from './redux/configStore'; 7 | 8 | const root = ReactDOM.createRoot(document.getElementById('root')); 9 | root.render( 10 | 11 | 12 | 13 | 14 | , 15 | 16 | ); 17 | -------------------------------------------------------------------------------- /src/component/Navbar.js: -------------------------------------------------------------------------------- 1 | import './books.css'; 2 | import { Link } from 'react-router-dom'; 3 | 4 | const Navbar = () => ( 5 |