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] Export AppliesToEligibility and ProductOrCollectionResource types #221

Open
vincaslt opened this issue Sep 27, 2024 · 0 comments · May be fixed by #224
Open

🐛[Bug] Export AppliesToEligibility and ProductOrCollectionResource types #221

vincaslt opened this issue Sep 27, 2024 · 0 comments · May be fixed by #224
Labels
bug Something isn't working

Comments

@vincaslt
Copy link

vincaslt commented Sep 27, 2024

Issue summary

AppliesToEligibility and ProductOrCollectionResource are not exported in @shopify/discount-app-components, so they can't be easily used to give types to form field values:

eligibility: useField(AppliesToEligibility.Products),
selectedItems: useField<ProductOrCollectionResource[]>([]),

<AppliesTo
  eligibility={eligibility}
  selectedItems={selectedItems}
/>

Expected behavior

Actual behavior

Steps to reproduce the problem

  1. First step
  2. Second step

Reduced test case

The best way to get your bug fixed is to provide a reduced test case. This CodeSandbox template is a great starting point.

Specifications

  • Are you using the React components? (Y/N):
  • discount-app-components version number:
  • Browser:
  • Device:
  • Operating System:

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/discount-app-components to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

@vincaslt vincaslt added the bug Something isn't working label Sep 27, 2024
@vincaslt vincaslt changed the title 🐛[Bug] 🐛[Bug] Export AppliesToEligibility and ProductOrCollectionResource types Sep 27, 2024
@thuan1412 thuan1412 linked a pull request Oct 25, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant