In preparing the stealth mode switch-over I noticed the announcement bar at the top of the nav could be made more flexible.
Right now it requires it to be a link, but maybe we dont want it to be a link (or dont have a link for it)
It also does not utilize the custom link component so that external links are automatically opened in new tabs.
So modifying it to a component and using custom link and conditional rendering based on the props
Details
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC05b571ee5321: [e.cash] Announcement bar edits
Preview the site, and check out the announcement bar. It should look and function the same
try npm run dev - go to navbar component in an editor, and try changing the announcement bar href prop to /get-ecash.
It should not open in new tab now
try removing the href prop
It should become not a link and have no hover effect
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/e.cash/components/navbar/index.js | ||
---|---|---|
66 ↗ | (On Diff #41678) | If we are using conditional rendering and props in this way, AnnouncementBar should be its own componenet, with link as an optional prop. The component itself should handle the rendering logic. |
Comment Actions
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.19.73:41754 for the next 60 minutes.