File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/components/ui/dashboard Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,18 @@ export function DynamicApiSelect<T>({
6565 filterFn : ( session : CoachingSession ) => boolean
6666 ) => {
6767 const filteredSessions = sessions . filter ( filterFn ) ;
68+
69+ const sortedSessions = filteredSessions . sort (
70+ ( a , b ) =>
71+ DateTime . fromISO ( a . date . toString ( ) ) . toMillis ( ) -
72+ DateTime . fromISO ( b . date . toString ( ) ) . toMillis ( )
73+ ) ;
74+
6875 return (
69- filteredSessions . length > 0 && (
76+ sortedSessions . length > 0 && (
7077 < SelectGroup >
7178 < SelectLabel > { label } </ SelectLabel >
72- { filteredSessions . map ( ( session ) => (
79+ { sortedSessions . map ( ( session ) => (
7380 < SelectItem value = { session . id } key = { session . id } >
7481 { DateTime . fromISO ( session . date . toString ( ) ) . toLocaleString (
7582 DateTime . DATETIME_FULL
You can’t perform that action at this time.
0 commit comments