add beatleader score fetching and add icons to FC
Some checks failed
deploy / deploy (push) Failing after 2s
Some checks failed
deploy / deploy (push) Failing after 2s
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { AppProvider } from "@/components/AppProvider";
|
||||
import { ssrSettings } from "@/ssrSettings";
|
||||
import { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
@ -40,7 +41,7 @@ export default function RootLayout({
|
||||
/>
|
||||
</div>
|
||||
|
||||
{children}
|
||||
<AppProvider>{children}</AppProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
@ -9,7 +9,7 @@ import Scores from "@/components/player/Scores";
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { useSettingsStore } from "@/store/settingsStore";
|
||||
import { SortType, SortTypes } from "@/types/SortTypes";
|
||||
import { getPlayerInfo } from "@/utils/scoresaber/api";
|
||||
import { ScoreSaberAPI } from "@/utils/scoresaber/api";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
@ -59,7 +59,7 @@ export default function Player({ params }: { params: { id: string } }) {
|
||||
return;
|
||||
}
|
||||
|
||||
getPlayerInfo(params.id).then((playerResponse) => {
|
||||
ScoreSaberAPI.getPlayerInfo(params.id).then((playerResponse) => {
|
||||
if (!playerResponse) {
|
||||
setError(true);
|
||||
setErrorMessage("Failed to fetch player. Is the ID correct?");
|
||||
|
@ -8,7 +8,7 @@ import { Spinner } from "@/components/Spinner";
|
||||
import PlayerRanking from "@/components/player/PlayerRanking";
|
||||
import PlayerRankingMobile from "@/components/player/PlayerRankingMobile";
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { fetchTopPlayers } from "@/utils/scoresaber/api";
|
||||
import { ScoreSaberAPI } from "@/utils/scoresaber/api";
|
||||
import { normalizedRegionName } from "@/utils/utils";
|
||||
import Link from "next/link";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
@ -53,7 +53,7 @@ export default function RankingCountry({ params }: RankingCountryProps) {
|
||||
const updatePage = useCallback(
|
||||
(page: any) => {
|
||||
console.log("Switching page to", page);
|
||||
fetchTopPlayers(page, country).then((response) => {
|
||||
ScoreSaberAPI.fetchTopPlayers(page, country).then((response) => {
|
||||
if (!response) {
|
||||
setError(true);
|
||||
setErrorMessage("No players found");
|
||||
|
@ -8,7 +8,7 @@ import { Spinner } from "@/components/Spinner";
|
||||
import PlayerRanking from "@/components/player/PlayerRanking";
|
||||
import PlayerRankingMobile from "@/components/player/PlayerRankingMobile";
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { fetchTopPlayers } from "@/utils/scoresaber/api";
|
||||
import { ScoreSaberAPI } from "@/utils/scoresaber/api";
|
||||
import { GlobeAsiaAustraliaIcon } from "@heroicons/react/20/solid";
|
||||
import Link from "next/link";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
@ -46,7 +46,7 @@ export default function RankingGlobal() {
|
||||
const updatePage = useCallback(
|
||||
(page: any) => {
|
||||
console.log("Switching page to", page);
|
||||
fetchTopPlayers(page).then((response) => {
|
||||
ScoreSaberAPI.fetchTopPlayers(page).then((response) => {
|
||||
if (!response) {
|
||||
setError(true);
|
||||
setErrorMessage("No players found");
|
||||
|
Reference in New Issue
Block a user