JiyaGupta-cs / ShopNex

React Ecommerce App
https://shopnex.vercel.app
90 stars 183 forks source link

Lack of Error Handling, Default Prop Values, and Accessibility Features in `Breadcrum` Component #538

Open Swapnilden opened 1 week ago

Swapnilden commented 1 week ago

Issue Description

The Breadcrum component lacks proper error handling, default prop values, and accessibility features. It also does not validate prop types or allow customization of the breadcrumb separator icon.

Steps to Reproduce

  1. Use the Breadcrum component without providing a product prop.
  2. Provide a product prop with missing category or name fields.
  3. Attempt to customize the breadcrumb separator icon.

Expected Behavior

  1. The Breadcrum component should render without errors even if the product prop is missing or incomplete.
  2. Default values should be used if category or name fields are missing from the product prop.
  3. The separator icon between breadcrumb items should be customizable.
  4. Accessibility attributes should be present for images.

Actual Behavior

  1. The Breadcrum component throws an error if the product prop is missing.
  2. Missing category or name fields result in rendering issues.
  3. The separator icon is not customizable.
  4. Images lack alt attributes for accessibility.

Screenshots

N/A