Skip to content

Implement "Recently Viewed" Section #85

@Alexandrbig1

Description

@Alexandrbig1

Priority: High
Difficulty: Advanced
Type: Frontend Feature


Description:
Create a Recently Viewed section at the bottom of the All Products page.
This section displays products the user has recently visited.


Requirements:

  1. Tracking

    • When a user clicks on a product (e.g., navigates to /products/:id), store that product in LocalStorage under recentlyViewed.
    • Ensure duplicates are not added (if already viewed, move it to the most recent position).
    • Limit history to the last 10 products.
  2. Recently Viewed Section

    • Appears below the product grid on /products.
    • Title: "Recently Viewed".
    • Display product cards (same style as product grid cards).
    • Supports pagination/slider (e.g., 5 items per view, user can navigate to next/prev).
  3. Product Card

    • Same design as main products (image, title, price, rating, flavors, wishlist, add to cart, hover → "View Product").
  4. Persistence

    • Data comes from LocalStorage only (for now).
    • When user returns later, section should still show their recently viewed products.

Assets:

Image


Acceptance Criteria:

  • Products user clicks on are tracked and stored in LocalStorage.
  • Section appears under the products grid with title "Recently Viewed".
  • Shows up to 10 items (most recent first).
  • Slider/pagination works correctly.
  • Clicking a card works the same as product grid (navigate to details, add to cart, wishlist, etc.).

Metadata

Metadata

Assignees

Labels

advancedComplex/advanced tasks or featuresfrontendTasks related to the frontend (React, Vite, TailwindCSS, UI components, pages)hacktoberfestSpecial issue for Hacktoberfesthacktoberfest-2025Special issue for Hacktoberfest 2025priority: highNeeds attention ASAP

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions