Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
124 changes: 124 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"private": true,
"homepage": "https://geekyhacks.github.io/BookStore_React/",
"dependencies": {
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.1.2",
"react-router-dom": "^6.15.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
Expand Down
61 changes: 28 additions & 33 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
import React from 'react';
import { Routes, Route, Link } from 'react-router-dom';
import MainContainer from './components/Books';
import Contact from './components/Contact';
import Categories from './components/Categories';
import Footer from './components/Footer';
import './styles/Css/App.css';
import accountPic from './assets/images/account-circle.svg';
import accountPic from './assets/account-circle.svg';
import BooksContainer from './redux/books/BooksContainer';
import CatContainer from './redux/categories/CatContainer';

function App() {
return (
<div className="fullWebsite">
<div className="App">
<nav className="navBar">
<div className="App">
<nav className="navBar">
<Link className="bookstoreTitle" to="/BookStore_React/">
Geeky Book Store
</Link>
<div className="navLinks">
<Link className="link" to="/BookStore_React/books">
Books
</Link>
<Link className="link" to="/BookStore_React/categories">
Categories
</Link>
<Link className="link" to="/BookStore_React/contact">
Contact
</Link>
<Link className="bookstoreTitle" to="/BookStore_React/">
Geeky Book Store
<img className="accountPic" src={accountPic} alt="" />
</Link>
<div className="navLinks">
<Link className="link" to="/BookStore_React/books">
Books
</Link>
<Link className="link" to="/BookStore_React/categories">
Categories
</Link>
<Link className="link" to="/BookStore_React/contact">
Contact
</Link>
<Link className="bookstoreTitle" to="/BookStore_React/">
<img className="accountPic" src={accountPic} alt="" />
</Link>
</div>
</nav>

<Routes>
{/* <Route index element={<Home />} /> */}
<Route path="/BookStore_React/" element={<MainContainer />} />
<Route path="/BookStore_React/books" element={<MainContainer />} />
<Route path="/BookStore_React/contact" element={<Contact />} />
<Route path="/BookStore_React/categories" element={<Categories />} />
<Route path="/BookStore_React/*" element={<div className="notFound"> Page not found!! </div>} />
</Routes>
</div>
</div>
</nav>
<Routes className="Routes">
<Route path="/BookStore_React/" element={<BooksContainer />} />
<Route path="/BookStore_React/books" element={<BooksContainer />} />
<Route path="/BookStore_React/contact" element={<Contact />} />
<Route path="/BookStore_React/*" element={<div className="notFound"> Page not found!! </div>} />
<Route path="/BookStore_React/categories" element={<CatContainer />} />
</Routes>
<Footer />
</div>
);
Expand Down
File renamed without changes
Binary file removed src/assets/images/Bookstore_CMS.png
Binary file not shown.
1 change: 1 addition & 0 deletions src/assets/react.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/welcometomyGIthub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/components/Books.jsx → src/components/BooksSection.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BooksContainer from './Books/BooksContainer';
import AddBook from './Books/AddBook';
import AddBook from './AddBook';

const Books = () => {
const BooksSection = () => {
const result = (
<div className="Books">
<BooksContainer />
Expand All @@ -12,4 +12,4 @@ const Books = () => {
return result;
};

export default Books;
export default BooksSection;
14 changes: 6 additions & 8 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const Footer = () => {
const result = (
<div>
<footer>
<h3 className="copyRights">
Copy rights reserved to
<a href="https://github.com/GeekyHacks"> GeekyHacks</a>
</h3>
</footer>
</div>
<footer>
<h3 className="copyRights">
Copy rights reserved to
<a href="https://github.com/GeekyHacks"> GeekyHacks</a>
</h3>
</footer>
);

return result;
Expand Down
27 changes: 0 additions & 27 deletions src/index.css

This file was deleted.

13 changes: 6 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import { BrowserRouter } from 'react-router-dom';
import App from './App';
import { store } from './redux/store';
import { Provider } from 'react-redux';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<BrowserRouter>
<App />
<Provider store={store}>
<App />
</Provider>
</BrowserRouter>
</React.StrictMode>,
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
Loading