Skip to content

Commit

Permalink
chore(frontend): always display chart
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Dec 8, 2024
1 parent 84e99a8 commit d80fc94
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/frontend/app/routes/_dashboard.analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
queryFactory,
selectRandomElement,
} from "~/lib/generals";
import { useGetMantineColors, useUserPreferences } from "~/lib/hooks";
import { useGetMantineColors } from "~/lib/hooks";

const TIME_RANGES = [
"Yesterday",
Expand Down Expand Up @@ -525,7 +525,6 @@ type ChartContainerProps = {
};

const ChartContainer = (props: ChartContainerProps) => {
const userPreferences = useUserPreferences();
const { startDate, endDate } = useTimeSpanSettings();
const [count, setCount] = useLocalStorage(
`FitnessChartContainer-${props.title}`,
Expand All @@ -546,7 +545,7 @@ const ChartContainer = (props: ChartContainerProps) => {
? props.children(count, userAnalytics)
: undefined;

return userPreferences.featuresEnabled.fitness.enabled ? (
return (
<Paper display="flex" h={380} withBorder={value?.totalItems === 0} p="md">
<Flex flex={1} align="center" direction="column">
<Group wrap="nowrap" w="100%" gap="xl" justify="center">
Expand Down Expand Up @@ -580,5 +579,5 @@ const ChartContainer = (props: ChartContainerProps) => {
</Flex>
</Flex>
</Paper>
) : null;
);
};

0 comments on commit d80fc94

Please sign in to comment.