Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]:TypeScript Error: Property 'quantity' does not exist on type 'CartItemProps' #196

Open
4 tasks done
iamabhishek2828 opened this issue Jul 3, 2024 · 4 comments
Open
4 tasks done
Assignees
Labels
gssoc Gssoc'24 Identifier level2 gssoc level2 issue

Comments

@iamabhishek2828
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Issue Title: TypeScript Error: Property 'quantity' does not exist on type 'CartItemProps'

Description:
When attempting to use the CartItem component in ./app/(routes)/cart/components/cart-item.tsx, TypeScript throws an error indicating that the quantity property is missing from the CartItemProps type. This error prevents the component from compiling correctly.

Steps to Reproduce:

  1. Navigate to ./app/(routes)/cart/components/cart-item.tsx.
  2. Ensure TypeScript is configured to check types.
  3. Attempt to compile the project using TypeScript.

Expected Behavior:
The CartItemProps type should include the quantity property to correctly type the CartItem component. This would allow the component to receive and utilize the quantity prop without TypeScript errors.

Actual Behavior:
TypeScript throws an error stating that the quantity property does not exist on type CartItemProps.

Additional Information:

  • TypeScript version: [Insert TypeScript version]
  • Project setup details: [Provide any relevant details about your project setup, such as TypeScript configuration or dependencies]

Screenshots/Code Snippets:

// Example of CartItemProps definition
interface CartItemProps {
  data: any;
  quantity: number; // This line is missing in the current definition
  handleAdd: () => void;
  handleDec: () => void;
}

Proposed Solution:
Update the CartItemProps interface in ./app/(routes)/cart/components/cart-item.tsx to include the quantity property as shown in the code snippet above. This change should resolve the TypeScript error.

Record

  • I agree to follow this project's Code of Conduct
  • I'm a GSSOC'24 contributor
  • I want to work on this issue
@github-actions github-actions bot added the level1 gssoc level1 issue label Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Hello @iamabhishek2828! Thanks for creating issue #196 on #Indie-Kart/ecommerce-store.Please Comment /assign-me to self assign this issue to yourself, and please don't forget to star this repo.

@github-actions github-actions bot added the gssoc Gssoc'24 Identifier label Jul 3, 2024
@iamabhishek2828
Copy link
Contributor Author

/assign-me

@trishanu-init trishanu-init added level2 gssoc level2 issue and removed level1 gssoc level1 issue labels Jul 6, 2024
Copy link

This issue has been assigned to @iamabhishek2828 for more than 5 days. Please provide an update.

1 similar comment
Copy link

This issue has been assigned to @iamabhishek2828 for more than 5 days. Please provide an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc Gssoc'24 Identifier level2 gssoc level2 issue
Projects
None yet
Development

No branches or pull requests

2 participants