{modalOrganization && (
-
{
- e.stopPropagation();
+ e.stopPropagation()
}}
>
-
-
-
- {modalOrganization.name}
+
+
+
+
+ {modalOrganization.name}
+
{/* Badges */}
-
-
+
{tags.forOrg(modalOrganization).map((tag, i) => (
-
-
+
{/* info & buttons */}
-
- {modalOrganization.branding.description}
+
+
+ {modalOrganization.branding.description}
+
{/* mobile stats */}
-
- {modalOrganization.location.country}
- {modalOrganization.location.continent}
+
+
+ {modalOrganization.location.country}
+
+
+ {modalOrganization.location.continent}
+
-
-
+
+
- Website
-
+
+ Website
+
+
-
+
- Transparent Finances
-
+
+ Transparent Finances
+
+
{/* desktop stats */}
-
+
- {modalOrganization.location.country}
- Country
+
+ {modalOrganization.location.country}
+
+
+ Country
+
- {modalOrganization.location.continent}
- Continent
+
+ {modalOrganization.location.continent}
+
+
+ Continent
+
-
-
)}
- {!modalOrganization && (
-
- )}
+ {!modalOrganization && }
- Climate-focused nonprofits {region ? `in ${region.label}` : ""} on{' '}
+ Climate-focused nonprofits {region ? `in ${region.label}` : ''} on{' '}
Hack Club Bank
new Organization(org))
.filter(organization => {
- const organizationBadgeIds = badges.forOrg(organization).map(badge => badge.id);
+ const organizationBadgeIds = badges
+ .forOrg(organization)
+ .map(badge => badge.id)
- console.log({ currentBadges, organizationBadgeIds, organization });
+ console.log({
+ currentBadges,
+ organizationBadgeIds,
+ organization
+ })
- return currentBadges.length == badges.length || intersection(organizationBadgeIds, currentBadges).length == currentBadges.length;
+ return (
+ currentBadges.length === badges.length ||
+ intersection(organizationBadgeIds, currentBadges).length ===
+ currentBadges.length
+ )
})
.map(organization => (
- )
- )}
+ ))}
@@ -954,8 +1133,8 @@ export default function ({ rawOrganizations, pageRegion }) {
}
/**
- * Represents an organization.
- */
+ * Represents an organization.
+ */
export class Organization {
/**
* Creates an instance of Organization.
@@ -1136,7 +1315,7 @@ export async function fetchRawClimateOrganizations() {
console.log('Fetching', page)
const json = await fetch(
'https://bank.hackclub.com/api/v3/directory/organizations?per_page=100&page=' +
- page
+ page
).then(res => res.json())
lastLength = json.length
page++