From f9af6cd8a7a7d7e288a42650a70f99a13087bd54 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 28 Feb 2023 19:12:16 +0800 Subject: [PATCH] Pass in all the 'i's --- src/components/shortcuts-settings.jsx | 4 ++-- src/components/shortcuts.jsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/shortcuts-settings.jsx b/src/components/shortcuts-settings.jsx index da555ce6..1681eced 100644 --- a/src/components/shortcuts-settings.jsx +++ b/src/components/shortcuts-settings.jsx @@ -249,10 +249,10 @@ function ShortcutsSettings() { if (!SHORTCUTS_META[type]) return null; let { icon, title } = SHORTCUTS_META[type]; if (typeof title === 'function') { - title = title(shortcut); + title = title(shortcut, i); } if (typeof icon === 'function') { - icon = icon(shortcut); + icon = icon(shortcut, i); } return (
  • diff --git a/src/components/shortcuts.jsx b/src/components/shortcuts.jsx index c6c24eb3..c0832415 100644 --- a/src/components/shortcuts.jsx +++ b/src/components/shortcuts.jsx @@ -33,16 +33,16 @@ function Shortcuts() { let { id, path, title, icon } = SHORTCUTS_META[type]; if (typeof id === 'function') { - id = id(data); + id = id(data, i); } if (typeof path === 'function') { path = path(data, i); } if (typeof title === 'function') { - title = title(data); + title = title(data, i); } if (typeof icon === 'function') { - icon = icon(data); + icon = icon(data, i); } return {