FIX THE PLAYER CHART RESIZING YESSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Some checks failed
Deploy / deploy (push) Failing after 2m36s

This commit is contained in:
Lee 2024-09-30 15:30:18 +01:00
parent 3e91c5d98a
commit d847f17f39
2 changed files with 5 additions and 6 deletions

@ -69,9 +69,7 @@ export default function RootLayout({
}>) { }>) {
return ( return (
<html lang="en"> <html lang="en">
<body <body className={`${siteFont.className} antialiased w-full h-full`}>
className={`${siteFont.className} antialiased w-full h-full relative`}
>
<DatabaseLoader> <DatabaseLoader>
<Toaster /> <Toaster />
<BackgroundImage /> <BackgroundImage />

@ -16,6 +16,7 @@ import { Line } from "react-chartjs-2";
import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player"; import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player";
import { getDaysAgo, parseDate } from "@/common/time-utils"; import { getDaysAgo, parseDate } from "@/common/time-utils";
import { useIsMobile } from "@/hooks/use-is-mobile"; import { useIsMobile } from "@/hooks/use-is-mobile";
import { useEffect } from "react";
Chart.register( Chart.register(
LinearScale, LinearScale,
@ -276,7 +277,7 @@ export default function PlayerRankChart({ player }: Props) {
const options: any = { const options: any = {
maintainAspectRatio: false, maintainAspectRatio: false,
aspectRatio: 1, responsive: true,
interaction: { interaction: {
mode: "index", mode: "index",
intersect: false, intersect: false,
@ -314,9 +315,9 @@ export default function PlayerRankChart({ player }: Props) {
}; };
return ( return (
<div className="h-96"> <div className="block h-[320px] w-full relative">
<Line <Line
className="w-fit" className="max-w-[100%]"
options={options} options={options}
data={data} data={data}
plugins={[ plugins={[