Skip to content

Commit

Permalink
fix: changed to hardcoded values
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMelox committed Jan 31, 2025
1 parent cf1a1f9 commit 0adf0fe
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,7 @@ const makeBreadcrumb = (item, title) => ({
key: `Breadcrumb ${item}`,
label: typeof title === 'string' ? title : `Breadcrumb ${item}`,
});
const now = new Date();
const m = now.getMonth();
if (m === 0) {
now.setFullYear(now.getFullYear() - 1);
now.setMonth(11);
} else {
now.setMonth(m - 1);
}
const ms = now.toLocaleString('default', { month: 'long' });
const ys = now.toLocaleString('default', { year: 'numeric' });

const breadcrumbs = {
'No breadcrumb': null,
'A single breadcrumb': [makeBreadcrumb(1, 'Home page')],
Expand All @@ -116,7 +107,7 @@ const breadcrumbs = {
'Demo breadcrumbs': [
makeBreadcrumb(1, 'Home page', '../../../homepage'),
makeBreadcrumb(2, 'Reports', '../../Reports'),
makeBreadcrumb(3, `${ms} ${ys}`, `../${ms}{ys}`),
makeBreadcrumb(3, `January 2025`, `../January 2025`),
],
};

Expand Down

0 comments on commit 0adf0fe

Please sign in to comment.