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

feat: fetch country and states list from S3 #916

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aritro2002
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

fetch country and stateslist from S3

How did you test it?

I have tested in local React Demo app.
Screenshot 2025-02-24 at 7 02 22 PM
Screenshot 2025-02-24 at 7 02 50 PM

Screen.Recording.2025-02-24.at.7.03.34.PM.mov

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@aritro2002 aritro2002 added the Ready for Review PR with label Ready for Review should only be reviewed. label Feb 24, 2025
@aritro2002 aritro2002 self-assigned this Feb 24, 2025
Copy link

semanticdiff-com bot commented Feb 24, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  package-lock.json  0% smaller
  package.json  0% smaller
  src/CardUtils.res Unsupported file format
  src/Components/AddressPaymentInput.res Unsupported file format
  src/Components/DynamicFields.res Unsupported file format
  src/Components/PhoneNumberPaymentInput.res Unsupported file format
  src/Country.res Unsupported file format
  src/GlobalVars.res Unsupported file format
  src/Hooks/CountryStateHooks.res Unsupported file format
  src/LoaderController.res Unsupported file format
  src/PaymentElement.res Unsupported file format
  src/Payments/ACHBankDebit.res Unsupported file format
  src/Payments/BacsBankDebit.res Unsupported file format
  src/Payments/BecsBankDebit.res Unsupported file format
  src/Payments/KlarnaPayment.res Unsupported file format
  src/Payments/PaymentMethodsRecord.res Unsupported file format
  src/Payments/PaymentMethodsWrapper.res Unsupported file format
  src/States.json Unsupported file format
  src/Types/ApplePayTypes.res Unsupported file format
  src/Types/PaymentType.res Unsupported file format
  src/Utilities/DynamicFieldsUtils.res Unsupported file format
  src/Utilities/GZipUtils.res Unsupported file format
  src/Utilities/PaymentUtils.res Unsupported file format
  src/Utilities/RecoilAtoms.res Unsupported file format
  src/Utilities/S3Utils.res Unsupported file format
  src/Utilities/Utils.res Unsupported file format
  src/hyper-log-catcher/HyperLogger.res Unsupported file format
  webpack.dev.js  0% smaller

@aritro2002 aritro2002 changed the title feat: fetch country and stateslist from S3 feat: fetch country and states list from S3 Feb 24, 2025
/>
| None => React.null
}}
{stateNames->Array.length > 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use renderif

/>
| None => React.null
}}
{stateNames->Array.length > 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use render if

/>
| None => React.null
}
stateNames->Array.length > 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use render if

let res = await AddressPaymentInput.importStates("./../States.json")
setStatesJson(_ => res.states)
let dict = Utils.getDictFromJson(stateList)
if dict->Js.Dict.entries->Array.length !== 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if dict->Js.Dict.entries->Array.length !== 0 {
if !(dict->Dict.empty()) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Review PR with label Ready for Review should only be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants