Skip to content

Commit

Permalink
New option on Education projects (As-Raparigas-do-Codigo#213)
Browse files Browse the repository at this point in the history
* New option on Education projects

* alteração de escola para educação

* alteração para education e correção exibição na pg atividades
  • Loading branch information
msantosdevlab authored Jul 13, 2024
1 parent b0dfe05 commit 2433719
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/add_new_activity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ body:
- Workshop
- Media
- Evento
- Educação
default: 0
validations:
required: true
Expand Down
3 changes: 2 additions & 1 deletion src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import FeatureFlags from './featureflags';
const Categories = Object.freeze({
EVENT: { label: 'evento', color: 'dark-blue' },
WORKSHOP: { label: 'workshop', color: 'dark-blue' },
MEDIA: { label: 'media', color: 'dark-blue' }
MEDIA: { label: 'media', 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 2433719

Please sign in to comment.