More typing and fixes

This commit is contained in:
Sean Edmunds
2025-04-25 15:02:00 -05:00
parent 74893ac68d
commit b280909ec9
31 changed files with 230 additions and 110 deletions

View File

@@ -1,8 +1,9 @@
import { Divider, Group } from '@mantine/core';
import { useCommonHooks } from 'hooks';
import type { SearchShortcut } from 'types';
import HintItem from './HintItem';
function HelpSection({ name, items }: { name: string; items: object[] }) {
function HelpSection({ name, items }: { name: string; items: SearchShortcut[] }) {
const { theme } = useCommonHooks();
return (
<>
@@ -30,8 +31,10 @@ function HelpSection({ name, items }: { name: string; items: object[] }) {
}}
>
{items
?.toSorted((a: any, b: any) => (a.command > b.command ? 1 : -1))
.map((item: any) => (
?.toSorted((a: SearchShortcut, b: SearchShortcut) =>
a.command > b.command ? 1 : -1,
)
.map((item: SearchShortcut) => (
<HintItem key={item.command} command={item.command} name={item.name} />
))}
</Group>