File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
app/(main)/dashboard/newsletters Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff line change @@ -27,8 +27,11 @@ export const groupByMonth = (newslettersList: Newsletter[]) => {
2727
2828export 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} ;
Original file line number Diff line number Diff line change @@ -17,13 +17,13 @@ import {
1717 StarIcon ,
1818 HeartIcon ,
1919 EnvelopeIcon ,
20+ NewspaperIcon ,
2021} from "@heroicons/react/24/outline" ;
2122import { useShowSidebar } from "@/store/useShowSidebar" ;
2223import { signOut } from "next-auth/react" ;
2324import { Twitter } from "../icons/icons" ;
2425import { ProfilePic } from "./ProfilePic" ;
25- import { useFilterStore } from "@/store/useFilterStore" ;
26- import { NewspaperIcon } from "lucide-react" ;
26+ import { useFilterStore } from "@/store/useFilterStore" ;
2727
2828const 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] ;
You can’t perform that action at this time.
0 commit comments