Page MenuHomePhabricator

[e.cash] Add faq page
ClosedPublic

Authored by johnkuney on May 25 2023, 15:51.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCfcb9c9452298: [e.cash] Add faq page
Summary

Adding the faq page. Created list of faqs and rendering them on the page. Note: made a style tweak to the H2 component
as the long title revealed a flaw

Test Plan

preview the site and navigate to the faq page
check everything looks good on both themes and all screen sizes
check content for any mistakes

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ecash-faq
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningweb/e.cash/public/animations/faq.json:23SPELL2Possible Spelling Mistake
Warningweb/e.cash/public/animations/faq.json:143SPELL2Possible Spelling Mistake
Warningweb/e.cash/public/animations/faq.json:239SPELL2Possible Spelling Mistake
Warningweb/e.cash/public/animations/faq.json:359SPELL2Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 23801
Build 47212: Build Diff
Build 47211: arc lint + arc unit

Event Timeline

bytesofman added inline comments.
web/e.cash/pages/faq.js
37 ↗(On Diff #40434)

do we need to use dangerouslySetInnerHTML here?

Why not define the answer as a react component instead of a string? This would also allow us to use our custom link component instead of having to manually code links to open in a new tab.

for example, instead of

{
        question:
            'Where can I find eCash price information compared to other cryptocurrencies?',
        answer: '<p>eCash price information is available at all leading crypto research sources, like <a href="https://www.coingecko.com/en/coins/ecash" target="_blank">Coingecko</a>, <a href="https://coinmarketcap.com/currencies/ecash/" target="_blank">Coinmarketcap</a>, and <a href="https://crypto.com/price/ecash?utm_medium=widget&amp;utm_campaign=CoinTickerClassic&amp;utm_source=crypto.com&amp;utm_id=ecash" target="_blank">Crypto.com</a></p>',
    },

do

{
        question:
            'Where can I find eCash price information compared to other cryptocurrencies?',
        answer: <><p>eCash price information is available at all leading crypto research sources, like <CustomLink href="https://www.coingecko.com/en/coins/ecash">Coingecko</CustomLink>, <CustomLink href="https://coinmarketcap.com/currencies/ecash/">Coinmarketcap</CustomLink>, and <CustomLink href="https://crypto.com/price/ecash?utm_medium=widget&amp;utm_campaign=CoinTickerClassic&amp;utm_source=crypto.com&amp;utm_id=ecash">Crypto.com</CustomLink></p></>,
    },

Then

<div>{faq.answer}</div>
This revision now requires changes to proceed.May 25 2023, 15:59

remove dangerously set html

This revision is now accepted and ready to land.May 25 2023, 18:36
This revision was landed with ongoing or failed builds.May 25 2023, 18:38
This revision was automatically updated to reflect the committed changes.