ReqoreTier: currency symbol is dropped when price is a string
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start in src/components/Tier/index.tsx at the currency condition shown in the issue, then check how price and salePrice are handled. Verify that numeric strings show the currency symbol while non-numeric labels such as “Custom” do not, and run the relevant Tier tests; the payload does not name a test file.
Written by the indexing model from the issue text.
Description
What happens
ReqoreTier drops the currency symbol whenever price is a string:
// src/components/Tier/index.tsx
currency && currencyPosition === 'before' && isNumber(price) ? currency : undefined
IReqoreTierProps declares price: string | number and currency: string, so
<ReqoreTier price="50" currency="$" /> is a perfectly legal call — it just renders
50 with no $, silently. Nothing warns, and the missing symbol is easy to miss in
review because the number itself is right.
Why it bites
Prices almost always arrive as strings: JSON payloads, CMS fields, Intl-formatted
amounts, anything with a decimal that must not be re-rounded. On the Qorus marketing
site both sources are strings — the pricing CMS global and the live Qorus SaaS
product catalogue (qorus_saas_product_prices.price) — so every plan card had lost
its currency symbol.
What the landing page does meanwhile
Coerces the value before handing it over, which is exactly the workaround this issue
asks to make unnecessary:
const priceOf = (price: string): string | number =>
/^\d+(\.\d+)?$/.test(price) ? Number(price) : price;
Suggested fix
In ReqoreTier, gate the currency on "the price is an amount", not on the JS type —
e.g. isNumber(price) || /^\d/.test(String(price)), applied to price and
salePrice alike. A non-numeric price (Custom, Contact us) should keep today's
behaviour of showing no symbol.
If the type-based gate is deliberate, then price should be typed number for the
currency path and the prop doc should say the symbol is numeric-only — right now the
types promise something the render does not deliver.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 0
- Avg merge
- 16h 28m
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qoretechnologies/reqore
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
qoretechnologies/reqore#725 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
qoretechnologies/reqore#711 ·
Maintainers usually reply within 1 day
-
Checkbox: a long description pushes the control out of its container — the label column cannot shrinkPossibly taken @Foxhoundn claimed this 53 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
qoretechnologies/reqore#662 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
qoretechnologies/reqore#745 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 73/100
qoretechnologies/reqore#738 ·
Maintainers usually reply within 1 day
All issues in qoretechnologies/reqore
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zabuton-app/meguri#875 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
iruzen-dono/workless#117 ·
Maintainers usually reply within 1 day
-
area:api area:web wave wave:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vetro-protocol/vetro-monorepo#1321 ·
Maintainers usually reply within 1 day