Skip to content

Commit

Permalink
refactor: set default ranking
Browse files Browse the repository at this point in the history
Signed-off-by: frank-zsy <[email protected]>
  • Loading branch information
frank-zsy committed Nov 29, 2024
1 parent 1a45214 commit 1a20acf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/leaderboards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ function OpenLeaderboard() {

useEffect(() => {
const search = new URLSearchParams(window.location.search);
const type = search.get('type');
let type = search.get('type');
if (!type) {
alert('You need to set a leaderboard type first.');
return;
type = 'projects';
}
if (type === 'projects') {
axios.get(`https://oss.open-digger.cn/leaderboards/${type}.json`).then(resp => {
Expand Down

0 comments on commit 1a20acf

Please sign in to comment.