Skip to content

Commit

Permalink
Align page date with app name
Browse files Browse the repository at this point in the history
  • Loading branch information
pkirilin committed Apr 2, 2024
1 parent 3bd6a0e commit 5019c63
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/frontend/src/features/pages/ui/PageDetailHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Typography,
type TypographyProps,
styled,
Box,
} from '@mui/material';
import { useMemo, type FC } from 'react';
import { Link as RouterLink } from 'react-router-dom';
Expand All @@ -29,16 +30,16 @@ export const PageDetailHeader: FC<Props> = ({ page }) => {
const totalCalories = useMemo(() => notes.reduce((sum, note) => sum + note.calories, 0), [notes]);

return (
<>
<Box display="flex" alignItems="center" gap={3} width="100%">
<Tooltip title="Back to pages list">
<IconButton edge="start" component={RouterLink} to="/pages" sx={{ marginRight: 1 }}>
<IconButton edge="start" component={RouterLink} to="/pages">
<ArrowBackIcon />
</IconButton>
</Tooltip>
<Stack direction="row" spacing={2} justifyContent="space-between" width="100%">
<TextStyled component="h1">{formatDate(new Date(page.date))}</TextStyled>
<TextStyled component="span">{totalCalories} kcal</TextStyled>
</Stack>
</>
</Box>
);
};

0 comments on commit 5019c63

Please sign in to comment.