Skip to content

Commit ed9f884

Browse files
committed
chore: add sort callback
1 parent e657681 commit ed9f884

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/client/editor/Editor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ export const Editor: FC<EditorProps> = ({
130130
<DropdownMenuPortal>
131131
<DropdownMenuContent>
132132
{Object.entries(examples)
133-
.sort()
133+
.sort(([_slugA, titleA], [_slugB, titleB]) => {
134+
return titleA.localeCompare(titleB)
135+
})
134136
.map(([slug, title]) => {
135137
const href = `${window.location.origin}/parameters/example/${slug}`;
136138
return (

0 commit comments

Comments
 (0)