From 0f2a85355923a4c9b1c71c6f8cf1413453d0d3c2 Mon Sep 17 00:00:00 2001 From: Akash-Ramjyothi Date: Thu, 14 Apr 2022 15:06:33 +0530 Subject: [PATCH] Added Sorting --- src/client/containers/AppSidebar.tsx | 2 ++ src/client/containers/NoteList.tsx | 2 ++ src/client/types/index.ts | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/src/client/containers/AppSidebar.tsx b/src/client/containers/AppSidebar.tsx index d0996fa5..40e98f20 100644 --- a/src/client/containers/AppSidebar.tsx +++ b/src/client/containers/AppSidebar.tsx @@ -8,6 +8,7 @@ import { ActionButton } from '@/components/AppSidebar/ActionButton' import { FolderOption } from '@/components/AppSidebar/FolderOption' import { ScratchpadOption } from '@/components/AppSidebar/ScratchpadOption' import { Folder, NotesSortKey } from '@/utils/enums' +import { newNote, sortByName } from 'helpers' import { CategoryList } from '@/containers/CategoryList' import { addNote, @@ -69,6 +70,7 @@ export const AppSidebar: React.FC = () => { ) const swapFolderHandler = _swapFolder(notesSortKey) + {categories.sort(sortByName).map(category => { return (