diff --git a/components/Charts/AreaChart/AreaChart.module.css b/components/Charts/AreaChart/AreaChart.module.css
index c5aefcb..5a709ce 100644
--- a/components/Charts/AreaChart/AreaChart.module.css
+++ b/components/Charts/AreaChart/AreaChart.module.css
@@ -1,6 +1,7 @@
.graphContainer {
width: 100%;
height: 100%;
+ position: relative;
border-radius: var(--main-borderRadius);
}
diff --git a/components/Charts/BarChart/BarChart.module.css b/components/Charts/BarChart/BarChart.module.css
index e69de29..0a3e33c 100644
--- a/components/Charts/BarChart/BarChart.module.css
+++ b/components/Charts/BarChart/BarChart.module.css
@@ -0,0 +1,5 @@
+.barChart {
+ /* position: relative; */
+ height: 100%;
+ width: 100%;
+}
diff --git a/components/Charts/DoughnutChart/DoughnutChart.module.css b/components/Charts/DoughnutChart/DoughnutChart.module.css
index 378466a..9d78b97 100644
--- a/components/Charts/DoughnutChart/DoughnutChart.module.css
+++ b/components/Charts/DoughnutChart/DoughnutChart.module.css
@@ -1,5 +1,7 @@
.container {
width: 100%;
+ height: 100%;
+ position: relative;
display: grid;
grid-template-columns: repeat(2, 1fr);
max-height: 12rem;
diff --git a/components/Charts/PlayersBarChart/PlayersBarChart.module.css b/components/Charts/PlayersBarChart/PlayersBarChart.module.css
index c2f6ae7..fc47c1c 100644
--- a/components/Charts/PlayersBarChart/PlayersBarChart.module.css
+++ b/components/Charts/PlayersBarChart/PlayersBarChart.module.css
@@ -1,14 +1,11 @@
.playersChart {
- display: flex;
- flex-flow: row;
-}
-
-.chart {
width: 100%;
- max-width: 100%;
- height: 14rem;
- max-height: 14rem;
display: flex;
+ /* max-width: 100%;
+ height: 14rem;
+ max-height: 14rem; */
+ height: 100%;
+ position: relative;
}
.yAxe {
diff --git a/components/Charts/PlayersBarChart/PlayersBarChart.tsx b/components/Charts/PlayersBarChart/PlayersBarChart.tsx
index 29d6f56..a9a1f7e 100644
--- a/components/Charts/PlayersBarChart/PlayersBarChart.tsx
+++ b/components/Charts/PlayersBarChart/PlayersBarChart.tsx
@@ -146,28 +146,13 @@ export default function PlayersBarChart({ players }: { players: [] }) {
return (
- {/*
- {labels.map((label, index) => {
- return (
-
- );
- })}
-
*/}
-
-
-
+
);
}
diff --git a/components/Charts/RadarChart/RadarChart.module.css b/components/Charts/RadarChart/RadarChart.module.css
index ec6dbcb..8517682 100644
--- a/components/Charts/RadarChart/RadarChart.module.css
+++ b/components/Charts/RadarChart/RadarChart.module.css
@@ -1,3 +1,5 @@
.radarChart {
- height: 20rem;
+ position: relative;
+ height: 100%;
+ width: 100%;
}
diff --git a/components/Charts/RadarChart/RadarChart.tsx b/components/Charts/RadarChart/RadarChart.tsx
index 1d457e9..6b6089a 100644
--- a/components/Charts/RadarChart/RadarChart.tsx
+++ b/components/Charts/RadarChart/RadarChart.tsx
@@ -32,10 +32,10 @@ function kFormatter(num: number) {
}
export default function RadarChart({
- winrateModData,
+ winRateModData,
averageModScore,
}: {
- winrateModData?: any;
+ winRateModData?: any;
averageModScore?: any;
}) {
const { theme } = useTheme();
@@ -69,10 +69,10 @@ export default function RadarChart({
'HDDT',
];
- if (winrateModData) {
- Object.keys(winrateModData).forEach((mod: any) => {
+ if (winRateModData) {
+ Object.keys(winRateModData).forEach((mod: any) => {
let label = mod.replace('played', '');
- let value = (winrateModData[mod]?.winrate * 100) | 0;
+ let value = (winRateModData[mod]?.winRate * 100) | 0;
mods.push({ label, value });
});
mods.sort(
@@ -121,7 +121,7 @@ export default function RadarChart({
labels: mods.map((mod) => mod.label),
datasets: [
{
- label: winrateModData
+ label: winRateModData
? 'Winrate %'
: averageModScore
? 'AVG Score'
@@ -192,8 +192,8 @@ export default function RadarChart({
color:
theme === 'dark' ? 'rgba(250,250,250,0.028)' : 'rgba(0,0,0,0.08)',
},
- min: winrateModData ? -25 : averageModScore ? -200000 : -25,
- max: winrateModData ? 100 : averageModScore ? 1000000 : 100,
+ min: winRateModData ? -25 : averageModScore ? -200000 : -25,
+ max: winRateModData ? 100 : averageModScore ? 1000000 : 100,
ticks: {
font: {
size: 10,
@@ -201,10 +201,10 @@ export default function RadarChart({
weight: 300,
},
color: theme === 'dark' ? 'rgba(250,250,250,0.7)' : '#707070',
- stepSize: winrateModData ? 25 : averageModScore ? 200000 : 25,
+ stepSize: winRateModData ? 25 : averageModScore ? 200000 : 25,
callback: (value: any, tick: any, values: any) => {
return value !== 0
- ? `${kFormatter(value)}${winrateModData ? '%' : ''}`
+ ? `${kFormatter(value)}${winRateModData ? '%' : ''}`
: '';
},
showLabelBackdrop: (context: any) => {
diff --git a/components/Collapsible/FiltersCollapsible/FiltersCollapsible.tsx b/components/Collapsible/FiltersCollapsible/FiltersCollapsible.tsx
index 1675cf6..8283d4c 100644
--- a/components/Collapsible/FiltersCollapsible/FiltersCollapsible.tsx
+++ b/components/Collapsible/FiltersCollapsible/FiltersCollapsible.tsx
@@ -19,7 +19,7 @@ export default function FiltersCollapsible({
isCollapsibleOpen: boolean;
data: {};
}) {
- const { type, rank, rating, matches, winrate, tiers } = params;
+ const { type, rank, rating, matches, winRate, tiers } = params;
const [paramsToPush, setParamsToPush] = useState({});
@@ -45,7 +45,7 @@ export default function FiltersCollapsible({
rank: rank != null ? rank : [],
rating: rating != null ? rating : [],
matches: matches != null ? matches : [],
- winrate: winrate != null ? winrate : [],
+ winRate: winRate != null ? winRate : [],
});
}, [params]);
diff --git a/components/Dashboard/GridCard/GridCard.module.css b/components/Dashboard/GridCard/GridCard.module.css
index e75ff0b..b784922 100644
--- a/components/Dashboard/GridCard/GridCard.module.css
+++ b/components/Dashboard/GridCard/GridCard.module.css
@@ -5,6 +5,11 @@
padding: var(--main-padding);
border-radius: var(--main-borderRadius);
gap: 1.3rem;
+ height: 28em;
+}
+
+.card.firstRow {
+ height: 20em;
}
.card h1 {
@@ -15,5 +20,13 @@
.content {
display: flex;
flex-flow: column;
+ align-items: center;
+ justify-content: center;
gap: 1rem;
+ height: 100%;
+}
+
+.content.notGraph {
+ align-items: start;
+ justify-content: start;
}
diff --git a/components/Dashboard/GridCard/GridCard.tsx b/components/Dashboard/GridCard/GridCard.tsx
index 8e56e4f..09c75a9 100644
--- a/components/Dashboard/GridCard/GridCard.tsx
+++ b/components/Dashboard/GridCard/GridCard.tsx
@@ -1,7 +1,11 @@
'use client';
+import clsx from 'clsx';
import styles from './GridCard.module.css';
+const firstRow = ['Most played mods', 'General', 'Per match'];
+const textCards = ['General', 'Per match'];
+
export default function GridCard({
title,
children,
@@ -11,14 +15,20 @@ export default function GridCard({
}) {
return (
{title}
-
{children}
+
+ {children}
+
);
}
diff --git a/components/Leaderboard/UserStats/UserStats.tsx b/components/Leaderboard/UserStats/UserStats.tsx
index b5786f0..a3190eb 100644
--- a/components/Leaderboard/UserStats/UserStats.tsx
+++ b/components/Leaderboard/UserStats/UserStats.tsx
@@ -30,7 +30,7 @@ export default function UserStats({ data }: { data: {} }) {
Winrate
- {parseFloat((data.winrate * 100).toFixed(2))}%
+ {parseFloat((data.winRate * 100).toFixed(2))}%
diff --git a/components/Range/RangeSlider.module.css b/components/Range/RangeSlider.module.css
index 2379f57..43ef62c 100644
--- a/components/Range/RangeSlider.module.css
+++ b/components/Range/RangeSlider.module.css
@@ -44,12 +44,12 @@
-moz-appearance: textfield;
}
-.winrate {
+.winRate {
position: relative;
display: block;
}
-.winrate::after {
+.winRate::after {
content: '%';
position: absolute;
diff --git a/lib/types.ts b/lib/types.ts
index 6dfb26d..b83a139 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -21,7 +21,7 @@ export const LeaderboardsQuerySchema = z.object({
rank: z.array(z.number().positive()).max(2).nullish(),
rating: z.array(z.number().positive().gte(100)).max(2).optional(),
matches: z.array(z.number().positive()).max(2).optional(),
- winrate: z.array(z.number().gte(0.01).lte(1)).max(2).optional(),
+ winRate: z.array(z.number().gte(0.01).lte(1)).max(2).optional(),
tiers: z.array(z.enum(leaderboardsTierNames)).optional(),
pageSize: z.number().default(25),
});