Bug fixes
This commit is contained in:
@@ -19,9 +19,9 @@ function Applications({ contentType }: { contentType: string[] }) {
|
||||
.sort((a: Application, b: Application) => {
|
||||
switch (appSort) {
|
||||
case 'A>Z':
|
||||
return a.name > b.name ? 1 : -1;
|
||||
return a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1;
|
||||
case 'Z>A':
|
||||
return a.name < b.name ? 1 : -1;
|
||||
return a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase() ? 1 : -1;
|
||||
case 'Newest':
|
||||
if (a.id && b.id) {
|
||||
return a.id < b.id ? 1 : -1;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function RecommendedApplications({
|
||||
linksActive={true}
|
||||
/>
|
||||
))
|
||||
.toSorted((a: any, b: any) => (a.key > b.key ? 1 : -1))
|
||||
.toSorted((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||
.slice(0, 5)}
|
||||
</Stack>
|
||||
</Group>
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function RecommendedBookmarks({
|
||||
{bookmark.name}
|
||||
</Text>
|
||||
))
|
||||
.toSorted((a: any, b: any) => (a.key > b.key ? 1 : -1))
|
||||
.toSorted((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||
.slice(0, 5)}
|
||||
</Stack>
|
||||
<Stack
|
||||
@@ -88,7 +88,7 @@ export default function RecommendedBookmarks({
|
||||
{bookmark.name}
|
||||
</Text>
|
||||
))
|
||||
.toSorted((a: any, b: any) => (a.key > b.key ? 1 : -1))
|
||||
.toSorted((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||
.slice(5, 10)}
|
||||
</Stack>
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user