diff --git a/src/app/(pages)/api/player/history/route.ts b/src/app/(pages)/api/player/history/route.ts index 371a46d..186e1f0 100644 --- a/src/app/(pages)/api/player/history/route.ts +++ b/src/app/(pages)/api/player/history/route.ts @@ -1,8 +1,7 @@ import { NextRequest, NextResponse } from "next/server"; import { connectMongo } from "@/common/mongo"; import { IPlayer, PlayerModel } from "@/common/schema/player-schema"; -import { PlayerHistory } from "@/common/player/player-history"; -import { seedPlayerHistory, sortPlayerHistory } from "@/common/player-utils"; +import { seedPlayerHistory } from "@/common/player-utils"; import { scoresaberService } from "@/common/service/impl/scoresaber"; export async function GET(request: NextRequest) { diff --git a/src/common/schema/player-schema.ts b/src/common/schema/player-schema.ts index e81ad35..bd149c8 100644 --- a/src/common/schema/player-schema.ts +++ b/src/common/schema/player-schema.ts @@ -108,7 +108,7 @@ PlayerSchema.methods.getHistoryPrevious = function (amount: number): { const toReturn: { [key: string]: PlayerHistory } = {}; const history = sortPlayerHistory(this.getStatisticHistory()); - for (let [date, stat] of history) { + for (const [date, stat] of history) { const parsedDate = new Date(date); if (getDaysAgo(parsedDate) + 1 <= amount) { toReturn[date] = stat; diff --git a/src/hooks/use-is-mobile.ts b/src/hooks/use-is-mobile.ts index d2b12ee..1a65a74 100644 --- a/src/hooks/use-is-mobile.ts +++ b/src/hooks/use-is-mobile.ts @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; export function useIsMobile() { const [isMobile, setIsMobile] = useState(false);