{"id":30761587,"url":"https://github.com/techkumarnitish/nxt-trendz-frontend","last_synced_at":"2025-09-04T14:14:21.380Z","repository":{"id":311954048,"uuid":"1020508457","full_name":"TechKumarNitish/nxt-trendz-frontend","owner":"TechKumarNitish","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-27T17:06:26.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T02:04:54.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechKumarNitish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-16T01:44:12.000Z","updated_at":"2025-08-27T17:06:30.000Z","dependencies_parsed_at":"2025-08-28T02:05:00.417Z","dependency_job_id":"ce082bde-da43-4830-8e60-f5cb1716af22","html_url":"https://github.com/TechKumarNitish/nxt-trendz-frontend","commit_stats":null,"previous_names":["techkumarnitish/nxt-trendz-frontend"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TechKumarNitish/nxt-trendz-frontend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechKumarNitish%2Fnxt-trendz-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechKumarNitish%2Fnxt-trendz-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechKumarNitish%2Fnxt-trendz-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechKumarNitish%2Fnxt-trendz-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechKumarNitish","download_url":"https://codeload.github.com/TechKumarNitish/nxt-trendz-frontend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechKumarNitish%2Fnxt-trendz-frontend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273619763,"owners_count":25138249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-04T14:14:19.813Z","updated_at":"2025-09-04T14:14:21.369Z","avatar_url":"https://github.com/TechKumarNitish.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"In this project, let's build a **Nxt Trendz - Cart Features** by applying the concepts we have learned till now.\n\n### Refer to the video below:\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cvideo style=\"max-width:70%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12);outline:none;\" loop=\"true\" autoplay=\"autoplay\" controls=\"controls\" muted\u003e\n    \u003csource src=\"https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-output.mp4\" type=\"video/mp4\"\u003e\n  \u003c/video\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n### Design Files\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- [Extra Small (Size \u003c 576px) and Small (Size \u003e= 576px)](https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-sm-output-v0.png)\n- [Medium (Size \u003e= 768px), Large (Size \u003e= 992px) and Extra Large (Size \u003e= 1200px)](https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-lg-output.png)\n\n\u003c/details\u003e\n\n### Set Up Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- Download dependencies by running `npm install`\n- Start up the app using `npm start`\n\u003c/details\u003e\n\n### Completion Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eFunctionality to be added\u003c/summary\u003e\n\u003cbr/\u003e\n\nThe app must have the following functionalities\n\n- When an unauthenticated user tries to access the **Cart** Route, then the page should be navigated to **Login** Route\n\n- Following are the features to be implemented\n\n  - Feature 1\n\n    - When an authenticated user tries to add the same product multiple times\n      - The quantity of the product should be updated accordingly, and the count of the cart items in the header should be remained same\n\n  - Feature 2\n\n    - The total amount and number of items in the cart should be displayed in the **Cart** Route\n\n  - Feature 3\n\n    - In each cart item in the cart\n      - When the plus icon is clicked, then the quantity of the product should be incremented by one\n      - When the minus icon is clicked, then the quantity of the product should be decremented by one\n      - When the quantity of the product is one and the minus icon is clicked, then the respective product should be removed from the cart\n      - Based on the quantity of the product, the product price and the Cart Summary, i.e the total cost should be updated accordingly\n\n  - Feature 4\n\n    - When an authenticated user clicks on the remove button, cart item should be removed from the cart list\n\n  - Feature 5\n\n    - When an authenticated user clicks on the **Remove All** button, all the cart items should be removed from the cart and [Empty Cart View](https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-empty-cart-view.png) should be displayed\n\n- The `CartContext` has an object as a value with the following properties\n  - `cartList` - this key stores the cart items\n  - `removeAllCartItems` - this method is used to remove all the cart items in the `cartList`\n  - `addCartItem` - this method adds the cart item to the `cartList`\n  - `removeCartItem` - this method removes the cart item from the `cartList`\n  - `incrementCartItemQuantity` - this method increases the quantity of a product in the `cartList`\n  - `decrementCartItemQuantity` - this method decreases the quantity of a product in the `cartList`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eComponents Structure\u003c/summary\u003e\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/nxt-trendz-cart-features-component-structure-breakdown.png\" alt=\"component structure breakdown\" style=\"max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImplementation Files\u003c/summary\u003e\n\u003cbr/\u003e\n\nUse these files to complete the implementation:\n\n- `src/App.js`\n- `src/components/Cart/index.js`\n- `src/components/Cart/index.css`\n- `src/components/CartItem/index.js`\n- `src/components/CartItem/index.css`\n- `src/components/CartSummary/index.js`\n- `src/components/CartSummary/index.css`\n\u003c/details\u003e\n\n### Quick Tips\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\u003cbr\u003e\n\n- The `line-height` CSS property sets the height of a line box. It's commonly used to set the distance between lines of text\n\n  ```\n  line-height: 1.5;\n  ```\n\n    \u003cbr/\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/react-js/line-height-img.png\" alt=\"line height\" style=\"width:90%; max-width: 600px;\"/\u003e\n\n- The array method `find()` returns the first item's value that satisfies the provided testing function. If no item is found, it returns `undefined`\n\n  **Syntax**: `arr.find(Testing Function)`\n\n\u003c/details\u003e\n\n### Important Note\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n**The following instructions are required for the tests to pass**\n\n- `BsPlusSquare`, `BsDashSquare` icons from `react-icons` should be used for **plus** and **minus** buttons in cart item\n- The Cart Item should consist of two HTML button elements with data-testid attribute values as **plus** and **minus** respectively\n- `AiFillCloseCircle` icon from react-icons should be used for **remove** button in cartItem\n- The Cart Item should consist of an HTML button element with data-testid attribute values as **remove**\n- The product image in **Cart Item** Route should have the alt as `title` of the product\n\n- Prime User credentials\n\n  ```text\n   username: rahul\n   password: rahul@2021\n  ```\n\n- Non-Prime User credentials\n\n  ```text\n   username: raja\n   password: raja@2021\n  ```\n\n\u003c/details\u003e\n\n### Resources\n\n\u003cdetails\u003e\n\u003csummary\u003eColors\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv style=\"background-color: #0b69ff; width: 150px; padding: 10px; color: white\"\u003eHex: #0b69ff\u003c/div\u003e\n\u003cdiv style=\"background-color: #171f46; width: 150px; padding: 10px; color: white\"\u003eHex: #171f46\u003c/div\u003e\n\u003cdiv style=\"background-color: #616e7c; width: 150px; padding: 10px; color: white\"\u003eHex: #616e7c\u003c/div\u003e\n\u003cdiv style=\"background-color: #ffffff; width: 150px; padding: 10px; color: black\"\u003eHex: #ffffff\u003c/div\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFont-families\u003c/summary\u003e\n\n- Roboto\n\n\u003c/details\u003e\n\n\u003e ### _Things to Keep in Mind_\n\u003e\n\u003e - All components you implement should go in the `src/components` directory.\n\u003e - Don't change the component folder names as those are the files being imported into the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechkumarnitish%2Fnxt-trendz-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechkumarnitish%2Fnxt-trendz-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechkumarnitish%2Fnxt-trendz-frontend/lists"}