X-lab2017 / open-leaderboard

OpenLeaderboard
https://open-leaderboard.x-lab.info
20 stars 22 forks source link

Complete Task 1: Platform Switch for Gitee and Github Rankings #120

Open iamSmallY opened 3 weeks ago

iamSmallY commented 3 weeks ago

Brief Information

This pull request is in the type of (more info about types):

Related issues (all available keywords):

Details

Added a selector to select different data sources such as GitHub or Gitee.

Checklist

Others

Currently the front-end can only fetch data from Github, so the data fetching part has not been modified for the time being, and only a selector has been added.

andyhuang18 commented 6 days ago

Refer to contribution. You should run npm run prettier to unify the code format after completing the task. This problem caused the workflow to fail. Please modify and commit the code in time.

andyhuang18 commented 5 days ago

When using select, you can consider setting its default width, otherwise the problem shown in the following picture will occur.

image

In addition, there is a tip in the antd official document that "Utilizing Radio is recommended when there are fewer total options (less than 5)."

Since there are only three platforms to choose from, github, gitee and all, I recommend using Radio to implement this function. Please feel free to share your ideas.