Skip to content

Commit

Permalink
Show weight chart period for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
pkirilin committed Oct 6, 2024
1 parent 1383b67 commit 68bad72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/frontend/src/pages/ui/WeightPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Typography } from '@mui/material';
import { type FC } from 'react';
import { useLoaderData, type LoaderFunction } from 'react-router-dom';
import { store } from '@/app/store';
Expand Down Expand Up @@ -39,9 +40,14 @@ export const loader: LoaderFunction = async () => {

export const Component: FC = () => {
const { weightLogsRequest } = useLoaderData() as LoaderData;
const from = dateLib.formatToUserFriendlyString(weightLogsRequest.from);
const to = dateLib.formatToUserFriendlyString(weightLogsRequest.to);

return (
<>
<Typography variant="h6" component="h1">
{from}{to}
</Typography>
<WeightChart weightLogsRequest={weightLogsRequest} />
<WeightLogsList weightLogsRequest={weightLogsRequest} />
</>
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/widgets/WeightChart/ui/WeightChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const WeightChart: FC<Props> = ({ weightLogsRequest }) => {
}}
dataset={dataset}
height={300}
margin={{ top: 16 }}
/>
);
};

0 comments on commit 68bad72

Please sign in to comment.