Lightning-Bounties / lb-next

3 stars 8 forks source link

Add display options for Price component #4

Closed aybanda closed 1 month ago

aybanda commented 1 month ago

@sutt This PR introduces environment variable-based display options for the Price component, allowing for flexible formatting of amounts.

Changes Made

Price Component: Updated to format amounts based on the REACT_APP_DISPLAY_OPTION environment variable.

Short Format: Displays amounts in thousands (e.g., 12k).

Text Format: Displays amounts with commas followed by "sats" (e.g., 12,000 sats).

Default Format: Displays amounts with commas (e.g., 12,000).

tsconfig.json: Minor adjustments to accommodate the changes.

Testing: Verified that the component displays correctly for all defined display options.

Usage: Set the environment variable in your .env file: REACT_APP_DISPLAY_OPTION=short


Tips appreciated https://buymeacoffee.com/aybanda

close #1

lb-founders commented 1 month ago

@aybanda Thank you for this, looks good! Two things:

  1. We've added some minor edits on top of your commit
    • Thanks for the package suggestion, we're going to take a look #7 and we'll bump the package-lock version soon too.
  2. Just need you to edit your PR description to merge this so you get the reward.
    • include the line close #1 as described here or see this example
    • you can do this by going to your PR message at top of this page, clicking "..." (top-right) > "edit"
    • we'll merge the PR into master.
    • then you just have to claim the reward as described here.

Cheers, ~LB-Founders

aybanda commented 1 month ago

@lb-founders updated it 👍

lb-founders commented 1 month ago

@aybanda merging in.

Just do "Claim Reward" on the app (instructions here) to claim those sats.

Thanks for the contribution. Hope to see you again