Anthropogenic / Anthropogenic/earth.api

Update component/codeblock.js

未關閉
#25 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement good first issue
主要語言
JavaScript
星號
41
分支
1
PR 合併指標
30 天內沒有已合併 PR

描述

### Update component/codeblock.js

### Prize Bounty
[comment]: # List the token type (ETH/ERC-20) and amount.

### Challenge Description
On the landing page, we have a code block that allows anyone to toggle between our current APIs. We need to update this block to:
- Include all APIs in the dropdown
- Example code and example response should change after the code is selected.
- The API route (shown as `/api/co2/2002` in the MockUps) should also act as a search field in which you manually type the route and get one result returned.
- This block should also have a new child block without the dropdown selector which we can use[ across the website on pages for example](https://www.hge.earth/co2/2002).

#### MockUp for Landing Page
image

#### Mock Up for Other Pages
![Uploading CleanShot 2022-09-07 at 17.40.07@2x.png…]()

### Submission Requirements
- Component can be used with all API routes
- Can be TypeScript or JavaScript
- Code will be reviewed by ENG Team

### Judging Criteria
- Will choose based on the first completed and code quality
- Will view all submissions

### Winner Announcement Date
Please plan to have judges from your organization (or others you choose) review the submissions as early as possible after the hackathon ends (or immediately upon submission if you set your submission deadline up to be first-to-submit) to ensure prompt winner announcement and payout.

### Resources
- Functionality should feel similar to [this codeblock.js demo](https://codesandbox.io/s/react-code-blocks-xgjrr?fontsize=14&file=/src/components/codeblocks.js).
- You can reach out team on the Earth API Discord Group or by contacting [gndclouds on Twitter](https://twitter.com/gndclouds).
- [Landing Page Sketch File](https://sketch.com/s/801b545b-8b89-4b4d-b030-a022c970536d)
- [Other Page Sketch File](https://sketch.com/s/801b545b-8b89-4b4d-b030-a022c970536d)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。