Updated import name
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
|
||||||
import { formatNumber, formatSecondsToTime } from "@/lib/formatters"
|
import { formatNumber, formatSecondsToTime } from "@/lib/formatters"
|
||||||
import { getAllBlitzKitStats, getBlitzBestMode, getBlitzKitLevel, getBlitzKitName, getBlitzMostPlayedKit } from "@/lib/hypixel/blitz/general"
|
import { getBlitzAllKitStats, getBlitzBestMode, getBlitzKitLevel, getBlitzKitName, getBlitzMostPlayedKit } from "@/lib/hypixel/blitz/general"
|
||||||
import { romanize } from "@/lib/hypixel/general"
|
import { romanize } from "@/lib/hypixel/general"
|
||||||
import { NonNullStats } from "@/lib/schema/player"
|
import { NonNullStats } from "@/lib/schema/player"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
@@ -54,7 +54,7 @@ function BlitzKitStatsTableHeader() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function BlitzKitStatsTable({ stats }: { stats: NonNullable<NonNullStats["Blitz"]> }) {
|
export function BlitzKitStatsTable({ stats }: { stats: NonNullable<NonNullStats["Blitz"]> }) {
|
||||||
const kitStats = getAllBlitzKitStats(stats)
|
const kitStats = getBlitzAllKitStats(stats)
|
||||||
return (
|
return (
|
||||||
<Table>
|
<Table>
|
||||||
<BlitzKitStatsTableHeader />
|
<BlitzKitStatsTableHeader />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Separator } from "@/components/ui/separator"
|
import { Separator } from "@/components/ui/separator"
|
||||||
import { formatNumber } from "@/lib/formatters"
|
import { formatNumber } from "@/lib/formatters"
|
||||||
import { getAllDuelsDivisions, getDuelsMostPlayed } from "@/lib/hypixel/duels/general"
|
import { getDuelsAllDivisions, getDuelsMostPlayed } from "@/lib/hypixel/duels/general"
|
||||||
import { devide, romanize } from "@/lib/hypixel/general"
|
import { devide, romanize } from "@/lib/hypixel/general"
|
||||||
import { NonNullStats } from "@/lib/schema/player"
|
import { NonNullStats } from "@/lib/schema/player"
|
||||||
import GeneralStats from "../GeneralStats"
|
import GeneralStats from "../GeneralStats"
|
||||||
@@ -12,7 +12,7 @@ export default function DuelsStats({ stats }: { stats: NonNullStats["Duels"] })
|
|||||||
|
|
||||||
const wl = formatNumber(devide(stats.wins, stats.losses))
|
const wl = formatNumber(devide(stats.wins, stats.losses))
|
||||||
const kd = formatNumber(devide(stats.kills, stats.deaths))
|
const kd = formatNumber(devide(stats.kills, stats.deaths))
|
||||||
const div = getAllDuelsDivisions(stats)
|
const div = getDuelsAllDivisions(stats)
|
||||||
const mostPlayed = getDuelsMostPlayed(stats)
|
const mostPlayed = getDuelsMostPlayed(stats)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@
|
|||||||
import { formatNumber } from "@/lib/formatters"
|
import { formatNumber } from "@/lib/formatters"
|
||||||
import { romanize } from "@/lib/hypixel/general"
|
import { romanize } from "@/lib/hypixel/general"
|
||||||
import {
|
import {
|
||||||
getAllMegawallsClassStats,
|
getMegawallsAllClassStats,
|
||||||
getMegaWallsClass,
|
getMegaWallsClass,
|
||||||
getMegaWallsDifficultyColor,
|
getMegaWallsDifficultyColor,
|
||||||
getMegaWallsModeName,
|
getMegaWallsModeName,
|
||||||
@@ -86,7 +86,7 @@ function MegaWallsTableHeader() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function MegaWallsClassStats({ stats }: { stats: NonNullable<NonNullStats["MegaWalls"]> }) {
|
function MegaWallsClassStats({ stats }: { stats: NonNullable<NonNullStats["MegaWalls"]> }) {
|
||||||
const classStats = getAllMegawallsClassStats(stats)
|
const classStats = getMegawallsAllClassStats(stats)
|
||||||
return (
|
return (
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{classStats.map((c, i) => {
|
{classStats.map((c, i) => {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function getBlitzKitName(kitId: typeof KITS[number]["id"]) {
|
|||||||
return KITS.find(k => k.id === kitId)!.name
|
return KITS.find(k => k.id === kitId)!.name
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllBlitzKitStats(stats: NonNullable<NonNullStats["Blitz"]>) {
|
export function getBlitzAllKitStats(stats: NonNullable<NonNullStats["Blitz"]>) {
|
||||||
const nums: { id: typeof KITS[number]["id"], nums: number[] }[] = []
|
const nums: { id: typeof KITS[number]["id"], nums: number[] }[] = []
|
||||||
|
|
||||||
for (const kit of KITS) {
|
for (const kit of KITS) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export function getDuelsDevision(devison: Devisions, stats: NonNullable<NonNullS
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllDuelsDivisions(stats: NonNullable<NonNullStats["Duels"]>) {
|
export function getDuelsAllDivisions(stats: NonNullable<NonNullStats["Duels"]>) {
|
||||||
for (const div of DIVISIONS.slice().reverse()) {
|
for (const div of DIVISIONS.slice().reverse()) {
|
||||||
const index = `all_modes_${div.id}_title_prestige` as const
|
const index = `all_modes_${div.id}_title_prestige` as const
|
||||||
const val = stats[index]
|
const val = stats[index]
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export function getMegaWallsMostPlayedClass(stats: NonNullable<NonNullStats["Meg
|
|||||||
return mostPlayedClass
|
return mostPlayedClass
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllMegawallsClassStats(stats: NonNullable<NonNullStats["MegaWalls"]>) {
|
export function getMegawallsAllClassStats(stats: NonNullable<NonNullStats["MegaWalls"]>) {
|
||||||
const statsArr: { id: typeof CLASSES[number]["id"], val: number[] }[] = []
|
const statsArr: { id: typeof CLASSES[number]["id"], val: number[] }[] = []
|
||||||
|
|
||||||
for (const klass of CLASSES) {
|
for (const klass of CLASSES) {
|
||||||
|
|||||||
Reference in New Issue
Block a user