Skip to content

Commit

Permalink
Add month to page title
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Apr 12, 2024
1 parent bd35e8f commit 8f2a195
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1411,8 +1411,7 @@ function MonthSelector({ month, monthBounds, onPrevMonth, onNextMonth }) {
fontWeight: 500,
}}
>
{/* eslint-disable-next-line rulesdir/typography */}
{monthUtils.format(month, "MMMM ''yy")}
{monthUtils.format(month, 'MMMM ‘yy')}
</Text>
<Button
type="bare"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ import { getPayees } from 'loot-core/client/actions';
import * as queries from 'loot-core/client/queries';
import { pagedQuery } from 'loot-core/client/query-helpers';
import { listen } from 'loot-core/platform/client/fetch';
import * as monthUtils from 'loot-core/shared/months';
import { q } from 'loot-core/shared/query';
import { isPreviewId } from 'loot-core/shared/transactions';

import { useDateFormat } from '../../../hooks/useDateFormat';
import { useLocalPref } from '../../../hooks/useLocalPref';
import { useNavigate } from '../../../hooks/useNavigate';
import { theme } from '../../../style';
import { TextOneLine } from '../../common/TextOneLine';
import { View } from '../../common/View';
import { Page } from '../../Page';
import { MobileBackButton } from '../MobileBackButton';
import { AddTransactionButton } from '../transactions/AddTransactionButton';
Expand Down Expand Up @@ -117,7 +120,12 @@ export function CategoryTransactions({ category, month }) {

return (
<Page
title={category.name}
title={
<View>
<TextOneLine>{category.name}</TextOneLine>
<TextOneLine>({monthUtils.format(month, 'MMMM ‘yy')})</TextOneLine>
</View>
}
headerLeftContent={<MobileBackButton />}
headerRightContent={
<AddTransactionButton state={{ categoryId: category.id }} />
Expand Down

0 comments on commit 8f2a195

Please sign in to comment.