mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 17:25:40 +03:00
Pass in all the 'i's
This commit is contained in:
parent
ba2aa18843
commit
f9af6cd8a7
2 changed files with 5 additions and 5 deletions
|
@ -249,10 +249,10 @@ function ShortcutsSettings() {
|
||||||
if (!SHORTCUTS_META[type]) return null;
|
if (!SHORTCUTS_META[type]) return null;
|
||||||
let { icon, title } = SHORTCUTS_META[type];
|
let { icon, title } = SHORTCUTS_META[type];
|
||||||
if (typeof title === 'function') {
|
if (typeof title === 'function') {
|
||||||
title = title(shortcut);
|
title = title(shortcut, i);
|
||||||
}
|
}
|
||||||
if (typeof icon === 'function') {
|
if (typeof icon === 'function') {
|
||||||
icon = icon(shortcut);
|
icon = icon(shortcut, i);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<li key={key}>
|
<li key={key}>
|
||||||
|
|
|
@ -33,16 +33,16 @@ function Shortcuts() {
|
||||||
let { id, path, title, icon } = SHORTCUTS_META[type];
|
let { id, path, title, icon } = SHORTCUTS_META[type];
|
||||||
|
|
||||||
if (typeof id === 'function') {
|
if (typeof id === 'function') {
|
||||||
id = id(data);
|
id = id(data, i);
|
||||||
}
|
}
|
||||||
if (typeof path === 'function') {
|
if (typeof path === 'function') {
|
||||||
path = path(data, i);
|
path = path(data, i);
|
||||||
}
|
}
|
||||||
if (typeof title === 'function') {
|
if (typeof title === 'function') {
|
||||||
title = title(data);
|
title = title(data, i);
|
||||||
}
|
}
|
||||||
if (typeof icon === 'function') {
|
if (typeof icon === 'function') {
|
||||||
icon = icon(data);
|
icon = icon(data, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue