diff --git a/README.md b/README.md deleted file mode 100644 index f4a8809..0000000 --- a/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# React Shop - - - - - - -## Description -The Online Shop is build with React. It has custom responsive layout styled with SCSS. It makes an API call to fetch mock products from [Dummy JSON API](https://dummyjson.com/products) with Redux [RTK Query](https://redux-toolkit.js.org/rtk-query/overview). Added also Toastify for notifications. -The application shows a product home page and a cart page, the routing is done with React Router. - -## Quick overview -- Browse products retrieved from a mock API -- View product details and add items to a cart -- Update item quantities or remove items from the cart -- Toast notifications for user actions -- Responsive layout using SCSS - -## Tech stack -- React (functional components + hooks) -- Redux Toolkit + RTK Query for async data -- React Router for navigation -- SCSS for styling -- react-toastify (notifications) - -## Getting started (local) -1. Clone the repository : -```git clone https://dadobos.github.io/react-shop.git``` -2. Go into the project folder: -```cd react-shop``` -3. Install dependencies: -```npm install``` -4. Start the dev server: -```npm start``` -5. Open the app in your browser: -```http://localhost:3000/``` - -## Common scripts -- npm start — start dev server (hot reload) -- npm run build — create a production build -- npm test — run tests (if present) - -## Notes for development -- API calls are handled with RTK Query; service files are located in src (look for a services or api directory). -- Styles are in SCSS — components can import their module styles or use shared partials. -- Routing lives under src (check App or routes-related files) — add pages or adjust routes there. -- For mock API changes, update the base URL or endpoints in the RTK Query service file. \ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 0000000..68c6766 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "main.css": "/react-shop/static/css/main.5007c65a.css", + "main.js": "/react-shop/static/js/main.1d36fdeb.js", + "index.html": "/react-shop/index.html", + "main.5007c65a.css.map": "/react-shop/static/css/main.5007c65a.css.map", + "main.1d36fdeb.js.map": "/react-shop/static/js/main.1d36fdeb.js.map" + }, + "entrypoints": [ + "static/css/main.5007c65a.css", + "static/js/main.1d36fdeb.js" + ] +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..5f52b35 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +
{Capitalize(product?.description ?? "")}
-- Discount: - {product.discountPercentage}% -
-- Price: - €{product.price} -
-- Stoc: - {product.stock} -
-Your cart is empty
-{cartItem.description}
- -An error occoured: {error}
- ) : ( - <> - {data.products?.map((product) => ( -Page not found
-