diff --git a/imports/ui/components/Menu/Menu.jsx b/imports/ui/components/Menu/Menu.jsx index 37dacb181..1ce0f0385 100644 --- a/imports/ui/components/Menu/Menu.jsx +++ b/imports/ui/components/Menu/Menu.jsx @@ -130,17 +130,18 @@ const _getHeadline = (headline, account) => { const MenuQuery = ({ account }) => { const atHome = (Router.current().url.replace(window.location.origin, '') === '/'); const hideEmpty = !atHome; + const defaultLabels = ['all', 'in-queue', 'voting-now', 'grace-period', 'ready-to-process', 'guild-kicks', 'rejected', 'approved']; const defaultMenu = (
- - - - - - - - + + + + + + + +
); @@ -149,7 +150,17 @@ const MenuQuery = ({ account }) => { if (loading) { return ( -
+
+
+
+
+ {_getHeadline('proposals', account)} +
+ {
} +
+
+
+ ); } if (error) return `Error! ${error}`; @@ -165,18 +176,12 @@ const MenuQuery = ({ account }) => { ); }); - const menuList = ( -
- - - - - - - - -
- ); + let i = 0; + for (const defaultItem of defaultMenu.props.children) { + defaultItem.props.score = (atHome) ? null : _getProposalCount(data.members, defaultLabels[i]); + i += 1; + } + const menuList = defaultMenu; return (