import { usePhotoStore } from '../store/photoStore' export function KeyboardHints() { const selectedCount = usePhotoStore((state) => state.selectedPhotos.length) const viewMode = usePhotoStore((state) => state.viewMode) // In preview mode the viewer has its own context, so the grid hints // would just be confusing. Hide them. if (viewMode === 'preview') return null const hints = selectedCount > 0 ? [ { key: '1-5', action: 'Rate' }, { key: 'P', action: 'Pick' }, { key: 'X', action: 'Discard' }, { key: 'E / Space', action: 'Preview' }, { key: 'Esc', action: 'Deselect' }, ] : [ { key: '↑↓←→', action: 'Navigate' }, { key: 'Click', action: 'Select' }, { key: 'Shift+Click', action: 'Range' }, { key: 'E / Space', action: 'Preview' }, { key: '\\', action: 'Filters' }, { key: '/', action: 'Search' }, ] return (
{hints.map((hint, i) => (
{hint.key} {hint.action} {i < hints.length - 1 && ( )}
))} {selectedCount > 0 && ( <> {selectedCount} selected )}
) }