Skip to content

Commit c4d0f3f

Browse files
committed
We’re modifying the original data set in eleventyComputed 😅
1 parent 28603cc commit c4d0f3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/site/_data/eleventyComputed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getCountryName(countryCode) {
2020
}
2121

2222
module.exports = {
23-
communityWithCountries: async function(data) {
23+
community: async function(data) {
2424
let community = data.community.filter(e => true);
2525
for(let meetup of community) {
2626
// sry for await in loop

src/site/community.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ layout: layouts/base.njk
8080
<span class="sr-only">Country</span>
8181
<select data-filter-bind="country" class="text-black py-1 px-2 rounded-default border border-white bg-white">
8282
<option selected value="">All Countries</option>
83-
{%- for country in communityWithCountries | select("countryName") | flatten | unique | sort(false, false) %}
83+
{%- for country in community | select("countryName") | flatten | unique | sort(false, false) %}
8484
<option value="{{ country | lower }}">{{ country }}</option>
8585
{%- endfor %}
8686
</select>
@@ -93,7 +93,7 @@ layout: layouts/base.njk
9393
"bg-gradient-card-seafoam hover:card-shadow-seafoam",
9494
"bg-gradient-card-gold hover:card-shadow-gold"]
9595
%}
96-
{%- for item in communityWithCountries | sort(false, false, 'name') %}
96+
{%- for item in community | sort(false, false, 'name') %}
9797

9898
{# chose a pseudorandom theme based on the city name #}
9999
{% set theme = item.name.length % 4 %}

0 commit comments

Comments
 (0)