Skip to content

Commit 3561a7b

Browse files
committed
removed default and sorted alphabetically
1 parent 7dd8ae0 commit 3561a7b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/components/LanguagePicker/MenuItem.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type { LocaleDisplayInfo } from "@/lib/types"
77
import { cn } from "@/lib/utils/cn"
88

99
import { CommandItem } from "../ui/command"
10-
import { Tag } from "../ui/tag"
1110

1211
import ProgressBar from "./ProgressBar"
1312

@@ -24,7 +23,6 @@ const MenuItem = ({ displayInfo, ...props }: ItemProps) => {
2423
targetName,
2524
approvalProgress,
2625
wordsApproved,
27-
isBrowserDefault,
2826
} = displayInfo
2927
const { t } = useTranslation("common")
3028
const locale = useLocale()
@@ -64,11 +62,6 @@ const MenuItem = ({ displayInfo, ...props }: ItemProps) => {
6462
>
6563
{targetName}
6664
</p>
67-
{isBrowserDefault && (
68-
<Tag variant="outline" size="small">
69-
{t("page-languages-browser-default")}
70-
</Tag>
71-
)}
7265
</div>
7366
<p className="text-xs uppercase text-body">{sourceName}</p>
7467
</div>

src/components/LanguagePicker/useLanguagePicker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ export const useLanguagePicker = (handleClose?: () => void) => {
5959
if (indexA >= 0 && indexB >= 0) return indexA - indexB
6060
if (indexA >= 0) return -1
6161
if (indexB >= 0) return 1
62-
return b.approvalProgress - a.approvalProgress
62+
63+
return a.sourceName.localeCompare(b.sourceName)
6364
}) || []
6465
)
6566
}, [locale, t])

0 commit comments

Comments
 (0)