sort folders alphabetically

This commit is contained in:
Mckay Wrigley 2023-04-18 16:05:44 -06:00
parent 5725024d80
commit 971cde5310
2 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ export const ChatFolders = ({ searchTerm }: Props) => {
<div className="flex w-full flex-col pt-2">
{folders
.filter((folder) => folder.type === 'chat')
.sort((a, b) => a.name.localeCompare(b.name))
.map((folder, index) => (
<Folder
key={index}

View File

@ -49,6 +49,7 @@ export const PromptFolders = () => {
<div className="flex w-full flex-col pt-2">
{folders
.filter((folder) => folder.type === 'prompt')
.sort((a, b) => a.name.localeCompare(b.name))
.map((folder, index) => (
<Folder
key={index}