Skip to content

Commit

Permalink
alteração para education e correção exibição na pg atividades
Browse files Browse the repository at this point in the history
  • Loading branch information
msantosdevlab committed Jul 13, 2024
1 parent c75de5a commit 8c1e380
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Categories = Object.freeze({
EVENT: { label: 'evento', color: 'dark-blue' },
WORKSHOP: { label: 'workshop', color: 'dark-blue' },
MEDIA: { label: 'media', color: 'dark-blue' },
EDUCACAO: { label: 'educação', color: 'dark-blue' }
EDUCATION: { label: 'educação', color: 'dark-blue' }
});

const LinkType = Object.freeze({
Expand Down
6 changes: 5 additions & 1 deletion src/pages/Activities/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ function Activities({ translation }) {
</button>
{Object.values(Constants.Categories).map((category, index) => {
const label = category.label;
return (
const categoryTotal = calculateCategoryTotal(label);

return categoryTotal ? (
<button
key={`categories-${index}`}
onClick={() => handleCategoryClick(label)}
Expand All @@ -117,6 +119,8 @@ function Activities({ translation }) {
} rounded-pill`}>
{capitalize(label)} <span>{calculateCategoryTotal(label)}</span>
</button>
) : (
''
);
})}
<Row className={'mt-4 mb-5'} xs={1} lg={4}>
Expand Down

0 comments on commit 8c1e380

Please sign in to comment.