diff --git a/src/components/shortcuts-settings.jsx b/src/components/shortcuts-settings.jsx index b21ff898..b793d47c 100644 --- a/src/components/shortcuts-settings.jsx +++ b/src/components/shortcuts-settings.jsx @@ -9,6 +9,8 @@ import states from '../utils/states'; import AsyncText from './AsyncText'; import Icon from './icon'; +const SHORTCUTS_LIMIT = 9; + const TYPES = [ 'following', 'notifications', @@ -134,6 +136,7 @@ export const SHORTCUTS_META = { function ShortcutsSettings() { const snapStates = useSnapshot(states); const { masto } = api(); + const { shortcuts } = snapStates; const [lists, setLists] = useState([]); const [followedHashtags, setFollowedHashtags] = useState([]); @@ -187,7 +190,7 @@ function ShortcutsSettings() {

{snapStates.shortcuts.length > 0 ? (
    - {snapStates.shortcuts.map((shortcut, i) => { + {shortcuts.map((shortcut, i) => { const key = i + Object.values(shortcut); const { type } = shortcut; let { icon, title } = SHORTCUTS_META[type]; @@ -223,7 +226,7 @@ function ShortcutsSettings() { +