diff --git a/apps/frontend/app/routes/_dashboard.analytics.tsx b/apps/frontend/app/routes/_dashboard.analytics.tsx
index 7728203988..491a94d805 100644
--- a/apps/frontend/app/routes/_dashboard.analytics.tsx
+++ b/apps/frontend/app/routes/_dashboard.analytics.tsx
@@ -264,7 +264,7 @@ const MusclesChart = () => {
const colors = useGetMantineColors();
return (
-
+
{(data, count) => ({
totalItems: data.workoutMuscles.length,
render: (
@@ -283,7 +283,7 @@ const MusclesChart = () => {
/>
),
})}
-
+
);
};
@@ -291,7 +291,7 @@ const ExercisesChart = () => {
const colors = useGetMantineColors();
return (
-
+
{(data, count) => ({
totalItems: data.workoutExercises.length,
render: (
@@ -311,13 +311,13 @@ const ExercisesChart = () => {
/>
),
})}
-
+
);
};
const TimeOfDayChart = () => {
return (
-
+
{(data) => {
const hours = data.hours.map((h) => ({
Count: h.count,
@@ -335,13 +335,12 @@ const TimeOfDayChart = () => {
),
};
}}
-
+
);
};
-type FitnessChartContainerProps = {
+type ChartContainerProps = {
title: string;
- smallSize?: boolean;
disableCounter?: boolean;
children: (
data: FitnessAnalytics,
@@ -352,7 +351,7 @@ type FitnessChartContainerProps = {
};
};
-const FitnessChartContainer = (props: FitnessChartContainerProps) => {
+const ChartContainer = (props: ChartContainerProps) => {
const userPreferences = useUserPreferences();
const { startDate, endDate } = useTimeSpanSettings();
const [count, setCount] = useLocalStorage(
@@ -375,10 +374,12 @@ const FitnessChartContainer = (props: FitnessChartContainerProps) => {
: undefined;
return userPreferences.featuresEnabled.fitness.enabled ? (
-
+
- {props.title}
+
+ {props.title}
+
{props.disableCounter || (value?.totalItems || 0) === 0 ? null : (