Refactor
This commit is contained in:
@@ -2,7 +2,7 @@ import { AccordionContent, AccordionItem, AccordionTrigger } from "@/components/
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { formatNumber } from "@/lib/formatters"
|
||||
import { getScoreColor } from "@/lib/hypixel/copsandcrims/general"
|
||||
import { getCopsAndCrimsScoreColor } from "@/lib/hypixel/copsandcrims/general"
|
||||
import { devide } from "@/lib/hypixel/general"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import CollapsedStats from "../../_components/CollapsedStats"
|
||||
@@ -18,7 +18,7 @@ export default function CopsAndCrimsStats({ stats }: { stats: NonNullStats["Cops
|
||||
const wins = stats.game_wins + stats.game_wins_deathmatch + stats.game_wins_gungame
|
||||
const kd = formatNumber(devide(kills, deaths))
|
||||
const score = Math.floor(kills / 2 + (stats.bombs_planted + stats.bombs_defused) / 3 + wins + devide(kills, stats.shots_fired) * 200)
|
||||
const scoreColor = getScoreColor(score)
|
||||
const scoreColor = getCopsAndCrimsScoreColor(score)
|
||||
|
||||
return (
|
||||
<AccordionItem value="cops-and-crims">
|
||||
|
||||
Reference in New Issue
Block a user