diff --git a/src/renderer/Grid/Grid.tsx b/src/renderer/Grid/Grid.tsx index 5688091f..813c2367 100644 --- a/src/renderer/Grid/Grid.tsx +++ b/src/renderer/Grid/Grid.tsx @@ -100,6 +100,7 @@ const GridComponent: React.FC = memo(({ return ( = memo(({ title, todotxtAttribute, filters, onClick }) => { - +const Group: React.FC = memo(({ settings, t, title, todotxtAttribute, filters, onClick }) => { if (!title || title.length === 0) { return ; } const groupElements = (typeof title === 'string') ? [title] : title + const formattedGroupElements = groupElements.map( + (groupElement) => formatGroupElement({ groupElement, settings, t, todotxtAttribute }) + ); return ( - {groupElements.map((groupElement, index) => { + {formattedGroupElements.map((groupElement, index) => { const selected: boolean = filters && (filters[todotxtAttribute as keyof Filters] || []).some( (filter: Filter) => filter && filter.name === groupElement.trim() ); @@ -41,4 +74,4 @@ const Group: React.FC = memo(({ title, todotxtAttribute, filters, on ); }); -export default Group; +export default withTranslation()(Group);