import { InteractionMapItem, interactionMap, sortInteractionMapByCategory, } from 'lib/settings/initialKeybindings' import { ForwardedRef, forwardRef } from 'react' import { useLocation } from 'react-router-dom' interface AllKeybindingsFieldsProps {} export const AllKeybindingsFields = forwardRef( ( props: AllKeybindingsFieldsProps, scrollRef: ForwardedRef ) => { // This is how we will get the interaction map from the context // in the future whene franknoirot/editable-hotkeys is merged. // const { state } = useInteractionMapContext() return (
{Object.entries(interactionMap) .sort(sortInteractionMapByCategory) .map(([category, categoryItems]) => (

{category}

{categoryItems.map((item) => ( ))}
))}
) } ) function KeybindingField({ item, category, }: { item: InteractionMapItem category: string }) { const location = useLocation() return (

{item.title}

{item.description}

{item.sequence.split(' ').map((chord, i) => ( {chord} ))}
) }