Bug fixes
This commit is contained in:
@@ -33,9 +33,15 @@ function Bookmarks({ contentType }: { contentType: string[] }) {
|
||||
.sort((a: BookmarkGroup, b: BookmarkGroup) => {
|
||||
switch (bookmarkSort) {
|
||||
case 'A>Z':
|
||||
return a.categoryName > b.categoryName ? 1 : -1;
|
||||
return a.categoryName.toLocaleLowerCase() >
|
||||
b.categoryName.toLocaleLowerCase()
|
||||
? 1
|
||||
: -1;
|
||||
case 'Z>A':
|
||||
return a.categoryName < b.categoryName ? 1 : -1;
|
||||
return a.categoryName.toLocaleLowerCase() <
|
||||
b.categoryName.toLocaleLowerCase()
|
||||
? 1
|
||||
: -1;
|
||||
case 'Newest':
|
||||
if (a.id && b.id) {
|
||||
return a.id < b.id ? 1 : -1;
|
||||
|
||||
Reference in New Issue
Block a user