Skip to content

Commit 33f39df

Browse files
committed
minor change
1 parent 43262ea commit 33f39df

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

apps/web/src/app/(main)/dashboard/newsletters/data/newsletters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const newsletters = [
114114
"leverage batch processing for handling large datasets",
115115
"set up webhooks for real-time integrations"
116116
],
117-
align: "right"
117+
align: "left"
118118
},
119119
{
120120
type: "heading",

apps/web/src/app/(main)/dashboard/newsletters/utils/newsletter.utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ export const groupByMonth = (newslettersList: Newsletter[]) => {
2727

2828
export const sortMonthKeys = (keys: string[]): string[] => {
2929
return keys.sort((a, b) => {
30-
const dateA = new Date(a);
31-
const dateB = new Date(b);
30+
// Parse month and year separately for reliable date parsing
31+
const [monthA, yearA] = a.split(" ");
32+
const [monthB, yearB] = b.split(" ");
33+
const dateA = new Date(`${monthA} 1, ${yearA}`);
34+
const dateB = new Date(`${monthB} 1, ${yearB}`);
3235
return dateB.getTime() - dateA.getTime();
3336
});
3437
};

apps/web/src/components/dashboard/Sidebar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ import {
1717
StarIcon,
1818
HeartIcon,
1919
EnvelopeIcon,
20+
NewspaperIcon,
2021
} from "@heroicons/react/24/outline";
2122
import { useShowSidebar } from "@/store/useShowSidebar";
2223
import { signOut } from "next-auth/react";
2324
import { Twitter } from "../icons/icons";
2425
import { ProfilePic } from "./ProfilePic";
25-
import { useFilterStore } from "@/store/useFilterStore";
26-
import { NewspaperIcon } from "lucide-react";
26+
import { useFilterStore } from "@/store/useFilterStore";
2727

2828
const SIDEBAR_ROUTES = [
2929
{
@@ -38,7 +38,7 @@ const SIDEBAR_ROUTES = [
3838
},
3939
{
4040
path: "/dashboard/newsletters",
41-
label: "News letters",
41+
label: "Newsletters",
4242
icon: <NewspaperIcon className="size-5" />,
4343
},
4444
];

0 commit comments

Comments
 (0)