From 7e403ed0bc754341f8366a1c588afc082672572c Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 12:50:41 +0300 Subject: [PATCH 01/21] Rename PanelOptions --- .../payload/globals/HURUMap/{PanelOptions.js => DataPanels.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/climatemappedafrica/src/payload/globals/HURUMap/{PanelOptions.js => DataPanels.js} (100%) diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/PanelOptions.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/DataPanels.js similarity index 100% rename from apps/climatemappedafrica/src/payload/globals/HURUMap/PanelOptions.js rename to apps/climatemappedafrica/src/payload/globals/HURUMap/DataPanels.js From adfc7cd2c1913531a55beba5be4dc163ca0352b6 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 12:55:53 +0300 Subject: [PATCH 02/21] Rename --- .../src/payload/globals/HURUMap/DataPanels.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/DataPanels.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/DataPanels.js index f47e0e99f..cf60493c5 100644 --- a/apps/climatemappedafrica/src/payload/globals/HURUMap/DataPanels.js +++ b/apps/climatemappedafrica/src/payload/globals/HURUMap/DataPanels.js @@ -1,12 +1,13 @@ import image from "../../fields/image"; -const PanelOptions = { - label: "Panel Options", +const DataPanels = { + label: "Data Panels", fields: [ { name: "items", type: "array", label: "Panel Items", + required: true, fields: [ { type: "select", @@ -61,4 +62,4 @@ const PanelOptions = { ], }; -export default PanelOptions; +export default DataPanels; From 255c784114444c0f552d92562f5e336d81e98272 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 12:56:22 +0300 Subject: [PATCH 03/21] Fix description --- apps/climatemappedafrica/src/payload/globals/HURUMap/Profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/Profile.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/Profile.js index 85f337a4a..7f33ea355 100644 --- a/apps/climatemappedafrica/src/payload/globals/HURUMap/Profile.js +++ b/apps/climatemappedafrica/src/payload/globals/HURUMap/Profile.js @@ -12,7 +12,7 @@ const Profile = { maxDepth: 1, required: true, admin: { - description: "The page to show the interactive map on.", + description: "The page to show the HURUmap profile on.", }, }, ], From a818cc757b90cdf7669754577b9484073fd8c863 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 12:56:42 +0300 Subject: [PATCH 04/21] Rename + fix localized --- .../src/payload/globals/HURUMap/RootGeography.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/RootGeography.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/RootGeography.js index 34ef7c658..d0b44ae0f 100644 --- a/apps/climatemappedafrica/src/payload/globals/HURUMap/RootGeography.js +++ b/apps/climatemappedafrica/src/payload/globals/HURUMap/RootGeography.js @@ -9,7 +9,6 @@ const RootGeography = { en: "Root Geography", }, type: "group", - localized: true, fields: [ { name: "code", @@ -17,7 +16,6 @@ const RootGeography = { label: { en: "Location Code", }, - localized: true, required: true, hasMany: false, defaultValue: "af", @@ -35,9 +33,8 @@ const RootGeography = { defaultValue: [20.0, 4.25], }, { - name: "rootGeographyHasData", + name: "hasData", type: "checkbox", - localized: true, label: { en: "Root geography has data", }, From a0951bfff1d5979b0c635985bab1aa016f6cffd3 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 13:01:41 +0300 Subject: [PATCH 05/21] Introduce group in Tutorial --- .../src/payload/globals/HURUMap/Tutorial.js | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/Tutorial.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/Tutorial.js index 9e6852f0e..5aea722b9 100644 --- a/apps/climatemappedafrica/src/payload/globals/HURUMap/Tutorial.js +++ b/apps/climatemappedafrica/src/payload/globals/HURUMap/Tutorial.js @@ -26,25 +26,17 @@ const Tutorial = { label: "Tutorial", fields: [ { - name: "enabled", - label: { - en: "Enable Tutorial", - }, - type: "checkbox", - defaultValue: true, - localized: true, - }, - { - name: "panel", - label: { - en: "Tutorial Panel", - }, + name: "tutorial", type: "group", - localized: true, - admin: { - condition: (_, siblingData) => !!siblingData?.enabled, - }, fields: [ + { + name: "enabled", + label: { + en: "Enable HURUmap Tutorial", + }, + type: "checkbox", + defaultValue: true, + }, { name: "steps", label: { @@ -60,6 +52,7 @@ const Tutorial = { return data?.title || `Step ${String(index).padStart(2, "0")}`; }, }, + condition: (_, siblingData) => !!siblingData?.enabled, }, fields: [ { From 40a61ac0602a4a2ee330c030f733cabdef15132f Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:05:34 +0300 Subject: [PATCH 06/21] Fix failing build Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- .github/workflows/climatemappedafrica-deploy-dev.yml | 5 +++++ apps/climatemappedafrica/src/lib/data/common/index.js | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index 285b91405..7242154a9 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -33,6 +33,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -61,6 +65,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/arm64 target: climatemappedafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" diff --git a/apps/climatemappedafrica/src/lib/data/common/index.js b/apps/climatemappedafrica/src/lib/data/common/index.js index 33104d6b4..939d7a362 100644 --- a/apps/climatemappedafrica/src/lib/data/common/index.js +++ b/apps/climatemappedafrica/src/lib/data/common/index.js @@ -65,9 +65,12 @@ async function getNavBar(siteSettings, variant, { slug }, hurumapProfile) { export async function getPagePaths(api) { const hurumapSettings = await api.findGlobal("settings-hurumap"); const { docs: pages } = await api.getCollection("pages"); - const { - page: { value: explorePage }, - } = hurumapSettings; + let explorePage; + if (hurumapSettings.page) { + explorePage = hurumapSettings.page.value; + } else { + explorePage = null; + } const paths = pages.flatMap(({ slug }) => { // TODO(kilemensi): Handle parent > child page relation e.g. /insights/news if (slug !== explorePage?.slug) { From b7998296ac5fa9236845ed5612050cc451994ed4 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:06:36 +0300 Subject: [PATCH 07/21] Update branch Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- .github/workflows/climatemappedafrica-deploy-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index 7242154a9..7aa2a9192 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -2,7 +2,7 @@ name: Climate Mapped Africa | Deploy | DEV on: push: - branches: [main] + branches: [ft/climatemapped-build-fix] paths: - "apps/climatemappedafrica/**" - "Dockerfile" From 62be9e4a9488cd1dd7621e161a3867d1b8e65634 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 13:13:25 +0300 Subject: [PATCH 08/21] Fetch HURUmap data only when enabled + and set respective blocks only when HURUmap data is available --- .../src/lib/data/common/index.js | 105 +++++++++--------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/apps/climatemappedafrica/src/lib/data/common/index.js b/apps/climatemappedafrica/src/lib/data/common/index.js index 33104d6b4..b784c3552 100644 --- a/apps/climatemappedafrica/src/lib/data/common/index.js +++ b/apps/climatemappedafrica/src/lib/data/common/index.js @@ -10,7 +10,7 @@ export function imageFromMedia(alt, url) { return { alt, src: url }; } -function getFooter(siteSettings, variant) { +function getFooter(variant, settings) { const { connect, footerNavigation, @@ -19,10 +19,8 @@ function getFooter(siteSettings, variant) { secondaryLogo, description, title, - } = siteSettings; - + } = settings.site; const { menus: footerMenus, ...footerProps } = footerNavigation; - const media = secondaryLogo || primaryLogo; const footerLogoUrl = typeof media === "string" ? null : media.url; @@ -40,37 +38,46 @@ function getFooter(siteSettings, variant) { }; } -async function getNavBar(siteSettings, variant, { slug }, hurumapProfile) { - const { locations } = hurumapProfile; +async function getNavBar(variant, settings) { + const { hurumap, site } = settings; const { connect: { links = [] }, - primaryNavigation: { menus = [], connect = [] }, - primaryLogo, drawerLogo, + primaryLogo, + primaryNavigation: { menus = [], connect = [] }, title, - } = siteSettings; + } = site; const socialLinks = links?.filter((link) => connect.includes(link.platform)); + let explorePagePath = null; + let locations = null; + if (hurumap?.enabled) { + explorePagePath = hurumap.profilePage.slug; + if (hurumap.profile) { + locations = hurumap.profile.locations; + } + } return { - logo: imageFromMedia(title, primaryLogo.url), drawerLogo: imageFromMedia(title, drawerLogo.url), - explorePagePath: slug, + explorePagePath, + locations, + logo: imageFromMedia(title, primaryLogo.url), menus, socialLinks, variant, - locations, }; } export async function getPagePaths(api) { const hurumapSettings = await api.findGlobal("settings-hurumap"); + let profilePage; + if (hurumapSettings?.enabled) { + profilePage = hurumapSettings.page.value; + } const { docs: pages } = await api.getCollection("pages"); - const { - page: { value: explorePage }, - } = hurumapSettings; const paths = pages.flatMap(({ slug }) => { // TODO(kilemensi): Handle parent > child page relation e.g. /insights/news - if (slug !== explorePage?.slug) { + if (slug !== profilePage?.slug) { return { params: { slugs: [slug === "index" ? "" : slug], @@ -80,7 +87,7 @@ export async function getPagePaths(api) { // HURUmap profile page return GEOGRAPHIES.map((code) => ({ params: { - slugs: [explorePage.slug, code], + slugs: [profilePage.slug, code], }, })); }); @@ -98,53 +105,45 @@ export async function getPageProps(api, context) { const { draftMode = false } = context; const options = { draft: draftMode }; - const hurumapProfile = await fetchProfile(); - const { docs: [page], } = await api.findPage(slug, options); - if (!page) { return null; } - const hurumap = await api.findGlobal("settings-hurumap"); - const { - page: { value: explorePage }, - } = hurumap; - const siteSettings = await api.findGlobal("settings-site"); - - const settings = { - hurumap, - hurumapProfile, - siteSettings, - }; - - let blocks = await blockify(page.blocks, api, context, settings); - const variant = page.slug === explorePage.slug ? "explore" : "default"; - - const footer = getFooter(siteSettings, variant); - const menus = await getNavBar( - siteSettings, - variant, - explorePage, - hurumapProfile, - ); - - if (slug === explorePage.slug) { - // The explore page is a special case. The only block we need to render is map and tutorial. - const explorePageBlocks = [ - { + let variant = "default"; + const settings = {}; + settings.site = (await api.findGlobal("settings-site")) || null; + const hurumapSettings = await api.findGlobal("settings-hurumap"); + if (hurumapSettings?.enabled) { + // TODO(koech): Handle cases when fetching profile fails? + const profile = await fetchProfile(); + const { page: hurumapPage, ...otherHurumapSettings } = hurumapSettings; + const { value: profilePage } = hurumapPage; + if (slug === profilePage.slug) { + variant = "explore"; + const explorePageBlock = { blockType: "explore-page", slugs: slugs.slice(1), - }, - { - blockType: "tutorial", - }, - ]; - blocks = await blockify(explorePageBlocks, api, context, settings); + }; + page.blocks.push(explorePageBlock); + if (hurumapSettings.tutorial?.enabled) { + const tutorialBlock = { blockType: "tutorial" }; + page.blocks.push(tutorialBlock); + } + } + settings.hurumap = { + ...otherHurumapSettings, + profile, + profilePage, + }; } + const blocks = await blockify(page, api, context, settings); + const footer = getFooter(variant, settings); + const menus = await getNavBar(variant, settings); + return { blocks, footer, From ea7a22f9f8897f41de389455e63d59483622606f Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 13:15:10 +0300 Subject: [PATCH 09/21] Update blockfy methods to handle HURUmap changes --- .../src/lib/data/blockify/explore-page.js | 16 ++++++++---- .../src/lib/data/blockify/hero.js | 25 ++++++++++++------- .../src/lib/data/blockify/index.js | 5 ++-- .../src/lib/data/blockify/page-hero.js | 2 +- .../src/lib/data/blockify/team.js | 2 +- .../src/lib/data/blockify/tutorial.js | 15 +++++------ 6 files changed, 39 insertions(+), 26 deletions(-) diff --git a/apps/climatemappedafrica/src/lib/data/blockify/explore-page.js b/apps/climatemappedafrica/src/lib/data/blockify/explore-page.js index 8377f338e..2f2179445 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/explore-page.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/explore-page.js @@ -1,13 +1,19 @@ import { fetchProfileGeography } from "@/climatemappedafrica/lib/hurumap"; -async function explorePage({ block: { slugs }, hurumap, hurumapProfile }) { +/** + * This function will be called only when HURUmap is enabled. + * @see @/climatemappedafrica/lib/data/common/index.js + */ +async function explorePage(block, _api, _context, { hurumap }) { const { - rootGeography, - labels: { dataNotAvailable, scrollToTop: scrollToTopLabel }, items: panelItems, - page: { value }, + labels: { dataNotAvailable, scrollToTop: scrollToTopLabel }, + profile: hurumapProfile, + profilePage, + rootGeography, } = hurumap; const { code: name } = rootGeography; + const { slugs } = block; const code = slugs.length ? slugs[0] : name; const { locations, preferredChildren, mapType, choropleth } = hurumapProfile; @@ -41,7 +47,7 @@ async function explorePage({ block: { slugs }, hurumap, hurumapProfile }) { blockType: "explore-page", choropleth, rootGeography, - explorePagePath: value.slug, + explorePagePath: profilePage.slug, locations, mapType, panel, diff --git a/apps/climatemappedafrica/src/lib/data/blockify/hero.js b/apps/climatemappedafrica/src/lib/data/blockify/hero.js index 66b91a3e0..8d6b76ca3 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/hero.js @@ -3,13 +3,19 @@ import { fetchProfileGeography, } from "@/climatemappedafrica/lib/hurumap"; -export default async function hero({ block, hurumap }) { +/** + * This function will be called even when HURUmap is disabled. + * @see @/climatemappedafrica/lib/data/common/index.js + * + * TODO(koech): Handle the case when hurumap?.enabled is undefined/false + * Should we hide the map? + */ +export default async function hero(block, _api, _context, { hurumap }) { const { - rootGeography: { center, code, rootGeographyHasData: pinRootGeography }, - page: { - value: { slug: explorePageSlug }, - }, + profilePage, + rootGeography: { center, code, hasData: pinRootGeography }, } = hurumap; + const { slug: explorePageSlug } = profilePage; const { geometries } = await fetchProfileGeography(code.toLowerCase()); const { level } = geometries.boundary?.properties ?? {}; const childLevelMaps = { @@ -26,15 +32,16 @@ export default async function hero({ block, hurumap }) { (location) => location.level === childLevel, ); const boundary = children[preferredLevel]; + return { ...block, - center, - slug: "hero", boundary, + center, + explorePageSlug, featuredLocations, level, - properties: geometries.boundary?.properties, pinRootGeography, - explorePageSlug, + properties: geometries.boundary?.properties, + slug: "hero", }; } diff --git a/apps/climatemappedafrica/src/lib/data/blockify/index.js b/apps/climatemappedafrica/src/lib/data/blockify/index.js index b89ee1313..40d3247ef 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/index.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/index.js @@ -12,14 +12,13 @@ const propsifyBlockBySlug = { tutorial, }; -export const blockify = async (blocks, api, context, settings) => { - const { hurumap, hurumapProfile } = settings; +export const blockify = async ({ blocks }, api, context, settings) => { const promises = blocks?.map(async (block) => { const slug = block.blockType; const propsifyBlock = propsifyBlockBySlug[slug]; if (propsifyBlock) { - return propsifyBlock({ block, api, context, hurumap, hurumapProfile }); + return propsifyBlock(block, api, context, settings); } return { ...block, diff --git a/apps/climatemappedafrica/src/lib/data/blockify/page-hero.js b/apps/climatemappedafrica/src/lib/data/blockify/page-hero.js index 1be4c04a4..0a732a785 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/page-hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/page-hero.js @@ -1,6 +1,6 @@ import { imageFromMedia } from "@/climatemappedafrica/lib/data/utils"; -async function pageHero({ block }) { +async function pageHero(block) { const { background: media, ...others } = block; let background = null; if (media) { diff --git a/apps/climatemappedafrica/src/lib/data/blockify/team.js b/apps/climatemappedafrica/src/lib/data/blockify/team.js index 74c51abf6..ccc51693e 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/team.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/team.js @@ -8,7 +8,7 @@ import { equalsIgnoreCase } from "@/climatemappedafrica/utils"; const getCountryFromCode = (alpha3) => countries.find((c) => equalsIgnoreCase(c.alpha3, alpha3)) ?? null; -async function team({ block, api, context }) { +async function team(block, api, context) { const { query } = context; const data = await getMembers(api, query); let members = null; diff --git a/apps/climatemappedafrica/src/lib/data/blockify/tutorial.js b/apps/climatemappedafrica/src/lib/data/blockify/tutorial.js index c1ba44590..6e8c39fb3 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/tutorial.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/tutorial.js @@ -1,18 +1,19 @@ -async function tutorial({ hurumap }) { - const { - panel: { steps }, - enabled, - } = hurumap; +/** + * This function will be called only when HURUmap tutorial is enabled. + * @see @/climatemappedafrica/lib/data/common/index.js + */ +async function tutorial(block, _api, _context, { hurumap }) { + const { steps, enabled } = hurumap.tutorial; const items = steps.map((step) => ({ ...step, selector: `#${step.selector}`, })); return { - blockType: "tutorial", - id: "tutorial", + ...block, enabled, items, + slug: block.blockType, }; } From f67fffe24f807b176de5cfdb3f45fc4531ca4f5a Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 13:15:42 +0300 Subject: [PATCH 10/21] Dummy remove --- .../src/payload/globals/HURUMap/index.js | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 apps/climatemappedafrica/src/payload/globals/HURUMap/index.js diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/index.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/index.js deleted file mode 100644 index 047dd2ce7..000000000 --- a/apps/climatemappedafrica/src/payload/globals/HURUMap/index.js +++ /dev/null @@ -1,34 +0,0 @@ -import PanelOptions from "./PanelOptions"; -import Profile from "./Profile"; -import RootGeography from "./RootGeography"; -import Tutorial from "./Tutorial"; - -const HURUMap = { - slug: "settings-hurumap", - label: "HURUMap", - description: "HURUMap Configuration", - access: { - read: () => true, - }, - admin: { - group: "Settings", - hideAPIURL: true, - }, - fields: [ - { - name: "enableHURUMap", - label: "Enable HURUMap", - type: "checkbox", - defaultValue: false, - }, - { - type: "tabs", - tabs: [Profile, RootGeography, Tutorial, PanelOptions], - admin: { - condition: (_, siblingData) => !!siblingData?.enableHURUMap, - }, - }, - ], -}; - -export default HURUMap; From 200144049a4d3824ec12f2f6a3715971fdcc5a14 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Tue, 5 Nov 2024 13:21:43 +0300 Subject: [PATCH 11/21] Fix HURUmap -> HURUMap --- .../src/payload/globals/HURUMap/index.js | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 apps/climatemappedafrica/src/payload/globals/HURUMap/index.js diff --git a/apps/climatemappedafrica/src/payload/globals/HURUMap/index.js b/apps/climatemappedafrica/src/payload/globals/HURUMap/index.js new file mode 100644 index 000000000..b91ebb6a1 --- /dev/null +++ b/apps/climatemappedafrica/src/payload/globals/HURUMap/index.js @@ -0,0 +1,34 @@ +import DataPanels from "./DataPanels"; +import Profile from "./Profile"; +import RootGeography from "./RootGeography"; +import Tutorial from "./Tutorial"; + +const HURUMap = { + slug: "settings-hurumap", + label: "HURUMap", + description: "HURUMap Configuration", + access: { + read: () => true, + }, + admin: { + group: "Settings", + hideAPIURL: true, + }, + fields: [ + { + name: "enableHURUMap", + label: "Enable HURUMap", + type: "checkbox", + defaultValue: false, + }, + { + type: "tabs", + tabs: [Profile, DataPanels, RootGeography, Tutorial], + admin: { + condition: (_, siblingData) => !!siblingData?.enableHURUMap, + }, + }, + ], +}; + +export default HURUMap; From 66db738ba5e42eb14d8518b273ca8d8196a17e59 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 5 Nov 2024 13:35:08 +0300 Subject: [PATCH 12/21] Fixed disabled hurumap --- .../src/lib/data/blockify/hero.js | 5 ++--- .../src/lib/data/common/index.js | 13 +++---------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/apps/climatemappedafrica/src/lib/data/blockify/hero.js b/apps/climatemappedafrica/src/lib/data/blockify/hero.js index 66b91a3e0..14909bac4 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/hero.js @@ -6,10 +6,9 @@ import { export default async function hero({ block, hurumap }) { const { rootGeography: { center, code, rootGeographyHasData: pinRootGeography }, - page: { - value: { slug: explorePageSlug }, - }, + page, } = hurumap; + const explorePageSlug = page?.value?.slug ?? null; const { geometries } = await fetchProfileGeography(code.toLowerCase()); const { level } = geometries.boundary?.properties ?? {}; const childLevelMaps = { diff --git a/apps/climatemappedafrica/src/lib/data/common/index.js b/apps/climatemappedafrica/src/lib/data/common/index.js index 939d7a362..cf3c2e0e1 100644 --- a/apps/climatemappedafrica/src/lib/data/common/index.js +++ b/apps/climatemappedafrica/src/lib/data/common/index.js @@ -65,12 +65,7 @@ async function getNavBar(siteSettings, variant, { slug }, hurumapProfile) { export async function getPagePaths(api) { const hurumapSettings = await api.findGlobal("settings-hurumap"); const { docs: pages } = await api.getCollection("pages"); - let explorePage; - if (hurumapSettings.page) { - explorePage = hurumapSettings.page.value; - } else { - explorePage = null; - } + const explorePage = hurumapSettings.page?.value || { slug: null }; const paths = pages.flatMap(({ slug }) => { // TODO(kilemensi): Handle parent > child page relation e.g. /insights/news if (slug !== explorePage?.slug) { @@ -112,9 +107,7 @@ export async function getPageProps(api, context) { } const hurumap = await api.findGlobal("settings-hurumap"); - const { - page: { value: explorePage }, - } = hurumap; + const explorePage = hurumap.page?.value || { slug: null }; const siteSettings = await api.findGlobal("settings-site"); const settings = { @@ -124,7 +117,7 @@ export async function getPageProps(api, context) { }; let blocks = await blockify(page.blocks, api, context, settings); - const variant = page.slug === explorePage.slug ? "explore" : "default"; + const variant = page.slug === explorePage?.slug ? "explore" : "default"; const footer = getFooter(siteSettings, variant); const menus = await getNavBar( From dcbe112015b258c36e7cf90680177738a004ee42 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 5 Nov 2024 13:44:20 +0300 Subject: [PATCH 13/21] Do not redirect on click if explore page is not defined --- apps/climatemappedafrica/src/components/Hero/Map.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/climatemappedafrica/src/components/Hero/Map.js b/apps/climatemappedafrica/src/components/Hero/Map.js index bd8f60512..e09f2833d 100644 --- a/apps/climatemappedafrica/src/components/Hero/Map.js +++ b/apps/climatemappedafrica/src/components/Hero/Map.js @@ -55,9 +55,11 @@ function Map({ }); }); layer.on("click", () => { - router.push( - `/${explorePageSlug}/${feature.properties.code.toLowerCase()}`, - ); + if (explorePageSlug) { + router.push( + `/${explorePageSlug}/${feature.properties.code.toLowerCase()}`, + ); + } }); } }; From 9c15a9008e2bdf1ea2b1e77f10f7959926cef761 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 5 Nov 2024 14:53:38 +0300 Subject: [PATCH 14/21] Fixed Hero rendering if hurumap is disabled --- apps/climatemappedafrica/src/components/Hero/Hero.js | 1 + apps/climatemappedafrica/src/components/Hero/Map.js | 10 ++++++---- apps/climatemappedafrica/src/lib/data/blockify/hero.js | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/climatemappedafrica/src/components/Hero/Hero.js b/apps/climatemappedafrica/src/components/Hero/Hero.js index 6085bc944..abfd54da8 100644 --- a/apps/climatemappedafrica/src/components/Hero/Hero.js +++ b/apps/climatemappedafrica/src/components/Hero/Hero.js @@ -153,6 +153,7 @@ Hero.propTypes = { featuredLocations: PropTypes.arrayOf(PropTypes.shape({})), properties: PropTypes.shape({}), level: PropTypes.string, + explorePageSlug: PropTypes.string, }; export default Hero; diff --git a/apps/climatemappedafrica/src/components/Hero/Map.js b/apps/climatemappedafrica/src/components/Hero/Map.js index e09f2833d..5a828363f 100644 --- a/apps/climatemappedafrica/src/components/Hero/Map.js +++ b/apps/climatemappedafrica/src/components/Hero/Map.js @@ -42,10 +42,12 @@ function Map({ }); layer.on("mouseover", () => { onLayerMouseOver(feature.properties.name.toLowerCase()); - layer.setStyle({ - fillColor: theme.palette.primary.main, - fillOpacity: 0.5, - }); + if (explorePageSlug) { + layer.setStyle({ + fillColor: theme.palette.primary.main, + fillOpacity: 0.5, + }); + } }); layer.on("mouseout", () => { onLayerMouseOver(null); diff --git a/apps/climatemappedafrica/src/lib/data/blockify/hero.js b/apps/climatemappedafrica/src/lib/data/blockify/hero.js index 8d6b76ca3..ed18e6741 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/hero.js @@ -14,6 +14,7 @@ export default async function hero(block, _api, _context, { hurumap }) { const { profilePage, rootGeography: { center, code, hasData: pinRootGeography }, + enableHURUMap, } = hurumap; const { slug: explorePageSlug } = profilePage; const { geometries } = await fetchProfileGeography(code.toLowerCase()); @@ -37,7 +38,7 @@ export default async function hero(block, _api, _context, { hurumap }) { ...block, boundary, center, - explorePageSlug, + explorePageSlug: enableHURUMap ? explorePageSlug : null, featuredLocations, level, pinRootGeography, From 2ff029ee4ea008709bfe2cdaf9f866ea07911733 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 5 Nov 2024 16:54:24 +0300 Subject: [PATCH 15/21] Updated workflow brNCH --- .github/workflows/climatemappedafrica-deploy-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index 7aa2a9192..7242154a9 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -2,7 +2,7 @@ name: Climate Mapped Africa | Deploy | DEV on: push: - branches: [ft/climatemapped-build-fix] + branches: [main] paths: - "apps/climatemappedafrica/**" - "Dockerfile" From 4206a44e3d03d7a0ec7a41b88676e04102bd70d0 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 6 Nov 2024 09:55:31 +0300 Subject: [PATCH 16/21] Undo deploy to dev changes --- .github/workflows/climatemappedafrica-deploy-dev.yml | 5 ----- apps/climatemappedafrica/src/lib/data/blockify/hero.js | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index 7242154a9..285b91405 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -33,10 +33,6 @@ jobs: with: fetch-depth: 0 - # Add support for more platforms with QEMU (optional) - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -65,7 +61,6 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/arm64 target: climatemappedafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" diff --git a/apps/climatemappedafrica/src/lib/data/blockify/hero.js b/apps/climatemappedafrica/src/lib/data/blockify/hero.js index ed18e6741..f0b33fdf7 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/hero.js @@ -7,16 +7,12 @@ import { * This function will be called even when HURUmap is disabled. * @see @/climatemappedafrica/lib/data/common/index.js * - * TODO(koech): Handle the case when hurumap?.enabled is undefined/false - * Should we hide the map? */ export default async function hero(block, _api, _context, { hurumap }) { const { profilePage, rootGeography: { center, code, hasData: pinRootGeography }, - enableHURUMap, } = hurumap; - const { slug: explorePageSlug } = profilePage; const { geometries } = await fetchProfileGeography(code.toLowerCase()); const { level } = geometries.boundary?.properties ?? {}; const childLevelMaps = { @@ -38,7 +34,7 @@ export default async function hero(block, _api, _context, { hurumap }) { ...block, boundary, center, - explorePageSlug: enableHURUMap ? explorePageSlug : null, + explorePageSlug: profilePage?.slug || null, featuredLocations, level, pinRootGeography, From e03e84a1a38deed29ab67594106d3186546acc83 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 6 Nov 2024 10:48:19 +0300 Subject: [PATCH 17/21] Ensure hurumap is not undefined --- apps/climatemappedafrica/src/lib/data/blockify/hero.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/climatemappedafrica/src/lib/data/blockify/hero.js b/apps/climatemappedafrica/src/lib/data/blockify/hero.js index f0b33fdf7..0f4cf6684 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/hero.js @@ -12,7 +12,7 @@ export default async function hero(block, _api, _context, { hurumap }) { const { profilePage, rootGeography: { center, code, hasData: pinRootGeography }, - } = hurumap; + } = hurumap ?? { rootGeography: {} }; const { geometries } = await fetchProfileGeography(code.toLowerCase()); const { level } = geometries.boundary?.properties ?? {}; const childLevelMaps = { From 00adb2584133dab50091ecd947fc5992db907ef7 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 7 Nov 2024 12:33:45 +0300 Subject: [PATCH 18/21] - Added color codes to Hero Map. - Made Map visible on mobile --- .../src/components/Hero/Hero.js | 82 ++++++++++--------- .../src/components/Hero/Hero.snap.js | 48 ++++++++++- .../src/components/Hero/Hero.test.js | 9 ++ .../src/components/Hero/Legend.js | 65 +++++++++++++++ .../src/components/Hero/Map.js | 75 +++++++++-------- .../src/lib/data/blockify/hero.js | 11 +++ .../src/payload/blocks/Hero.js | 7 ++ packages/hurumap-next/src/index.js | 1 + 8 files changed, 219 insertions(+), 79 deletions(-) create mode 100644 apps/climatemappedafrica/src/components/Hero/Legend.js diff --git a/apps/climatemappedafrica/src/components/Hero/Hero.js b/apps/climatemappedafrica/src/components/Hero/Hero.js index abfd54da8..9af0e3106 100644 --- a/apps/climatemappedafrica/src/components/Hero/Hero.js +++ b/apps/climatemappedafrica/src/components/Hero/Hero.js @@ -4,6 +4,8 @@ import dynamic from "next/dynamic"; import PropTypes from "prop-types"; import React, { useState } from "react"; +import Legend from "./Legend"; + import heroBg from "@/climatemappedafrica/assets/images/bg-map-white.jpg"; import DropdownSearch from "@/climatemappedafrica/components/DropdownSearch"; import Image from "@/climatemappedafrica/components/Image"; @@ -23,6 +25,8 @@ function Hero({ properties, level, explorePageSlug, + averageTemperature, + legend, ...props }) { const isUpLg = useMediaQuery((theme) => theme.breakpoints.up("lg")); @@ -99,45 +103,44 @@ function Hero({ {/* Since map is dynamic-ally loaded, no need for implementation="css" */} - - - {center ? ( - - ) : null} - - - {hoverGeo} - - - - + + + {center ? ( + + ) : null} + + + + {hoverGeo} + + + @@ -154,6 +157,7 @@ Hero.propTypes = { properties: PropTypes.shape({}), level: PropTypes.string, explorePageSlug: PropTypes.string, + averageTemperature: PropTypes.string, }; export default Hero; diff --git a/apps/climatemappedafrica/src/components/Hero/Hero.snap.js b/apps/climatemappedafrica/src/components/Hero/Hero.snap.js index 6b4302a5f..b21c29c23 100644 --- a/apps/climatemappedafrica/src/components/Hero/Hero.snap.js +++ b/apps/climatemappedafrica/src/components/Hero/Hero.snap.js @@ -90,14 +90,54 @@ exports[` renders unchanged 1`] = `
+ class="MuiBox-root css-0" + > +
+
+
+
+
+
+
+
+
+
diff --git a/apps/climatemappedafrica/src/components/Hero/Hero.test.js b/apps/climatemappedafrica/src/components/Hero/Hero.test.js index ec342ec4f..2f50687e7 100644 --- a/apps/climatemappedafrica/src/components/Hero/Hero.test.js +++ b/apps/climatemappedafrica/src/components/Hero/Hero.test.js @@ -48,6 +48,15 @@ const defaultProps = { }, variant: "explore", icon: null, + legend: [ + { min: 10, max: 13, color: "#021AFE" }, + { min: 13, max: 16, color: "#5455FF" }, + { min: 16, max: 19, color: "#928EFD" }, + { min: 19, max: 22, color: "#B494DF" }, + { min: 22, max: 25, color: "#FA9B9B" }, + { min: 25, max: 28, color: "#F96264" }, + { min: 28, max: 31, color: "#F80701" }, + ], }; describe("", () => { diff --git a/apps/climatemappedafrica/src/components/Hero/Legend.js b/apps/climatemappedafrica/src/components/Hero/Legend.js new file mode 100644 index 000000000..f1a3f8139 --- /dev/null +++ b/apps/climatemappedafrica/src/components/Hero/Legend.js @@ -0,0 +1,65 @@ +import { RichTypography } from "@commons-ui/legacy"; +import { Box, Tooltip } from "@mui/material"; +import PropTypes from "prop-types"; +import React, { useState, forwardRef } from "react"; + +const Legend = forwardRef(function Legend({ data, title }, ref) { + const [hoveredValue, setHoveredValue] = useState(null); + + const handleMouseEnter = (value) => { + setHoveredValue(value); + }; + + const handleMouseLeave = () => { + setHoveredValue(null); + }; + + return ( + + + {title} + + + {data.map((item) => ( + + handleMouseEnter(`${item.min} - ${item.max}`)} + onMouseLeave={handleMouseLeave} + sx={{ + backgroundColor: item.color, + height: 24, + minWidth: 24, + cursor: "pointer", + }} + /> + + ))} + {hoveredValue && ( + + {hoveredValue} + + )} + + + ); +}); + +Legend.propTypes = { + data: PropTypes.arrayOf( + PropTypes.shape({ + min: PropTypes.number.isRequired, + max: PropTypes.number.isRequired, + color: PropTypes.string.isRequired, + }), + ).isRequired, +}; + +export default Legend; diff --git a/apps/climatemappedafrica/src/components/Hero/Map.js b/apps/climatemappedafrica/src/components/Hero/Map.js index 5a828363f..eab88d671 100644 --- a/apps/climatemappedafrica/src/components/Hero/Map.js +++ b/apps/climatemappedafrica/src/components/Hero/Map.js @@ -23,19 +23,23 @@ function Map({ onLayerMouseOver, featuredLocations, explorePageSlug, + choropleth, }) { const router = useRouter(); - const countyCodes = featuredLocations?.map(({ code }) => code); - + const regionCodes = featuredLocations?.map(({ code }) => code); const theme = useTheme(); const onEachFeature = (feature, layer) => { + const choroplethColor = choropleth?.find?.( + (c) => c.code.toLowerCase() === feature.properties.code.toLowerCase(), + ); layer.setStyle({ fillColor: theme.palette.background.default, + ...choroplethColor, fillOpacity: 1, }); - if (countyCodes.includes(feature.properties.code?.toLowerCase())) { + if (regionCodes.includes(feature.properties.code?.toLowerCase())) { layer.setStyle({ weight: 1.5, dashArray: 0, @@ -51,10 +55,7 @@ function Map({ }); layer.on("mouseout", () => { onLayerMouseOver(null); - layer.setStyle({ - fillOpacity: 1, - fillColor: theme.palette.background.default, - }); + layer.setStyle({ ...choroplethColor, fillOpacity: 1 }); }); layer.on("click", () => { if (explorePageSlug) { @@ -67,36 +68,38 @@ function Map({ }; return ( - - + - - + + + + ); } diff --git a/apps/climatemappedafrica/src/lib/data/blockify/hero.js b/apps/climatemappedafrica/src/lib/data/blockify/hero.js index 0f4cf6684..f225159d4 100644 --- a/apps/climatemappedafrica/src/lib/data/blockify/hero.js +++ b/apps/climatemappedafrica/src/lib/data/blockify/hero.js @@ -1,3 +1,5 @@ +import { generateChoropleth } from "@hurumap/next"; + import { fetchProfile, fetchProfileGeography, @@ -12,6 +14,7 @@ export default async function hero(block, _api, _context, { hurumap }) { const { profilePage, rootGeography: { center, code, hasData: pinRootGeography }, + profile: hurumapProfile, } = hurumap ?? { rootGeography: {} }; const { geometries } = await fetchProfileGeography(code.toLowerCase()); const { level } = geometries.boundary?.properties ?? {}; @@ -21,6 +24,12 @@ export default async function hero(block, _api, _context, { hurumap }) { }; const childLevel = childLevelMaps[level]; const { locations, preferredChildren } = await fetchProfile(); + const chloropleth = hurumapProfile?.choropleth ?? null; + const { choropleth, legend } = generateChoropleth( + chloropleth, + locations, + "choropleth", + ); const preferredChildrenPerLevel = preferredChildren[level]; const { children } = geometries; const preferredLevel = @@ -40,5 +49,7 @@ export default async function hero(block, _api, _context, { hurumap }) { pinRootGeography, properties: geometries.boundary?.properties, slug: "hero", + choropleth, + legend, }; } diff --git a/apps/climatemappedafrica/src/payload/blocks/Hero.js b/apps/climatemappedafrica/src/payload/blocks/Hero.js index 674343824..6c2b6c23c 100644 --- a/apps/climatemappedafrica/src/payload/blocks/Hero.js +++ b/apps/climatemappedafrica/src/payload/blocks/Hero.js @@ -52,6 +52,13 @@ const Hero = { label: "Comment", localized: true, }, + { + name: "averageTemperature", + type: "text", + label: "Average Temperature", + defaultValue: "Average Temperature", + localized: true, + }, ], }; diff --git a/packages/hurumap-next/src/index.js b/packages/hurumap-next/src/index.js index 52d900496..9a9fc3d0e 100644 --- a/packages/hurumap-next/src/index.js +++ b/packages/hurumap-next/src/index.js @@ -1,2 +1,3 @@ export { default as Source } from "./Source"; export { default as Map } from "./Map"; +export { generateChoropleth } from "./Map/utils"; From bdf816ca49f6dab1a73accc08d5b5676be481aba Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 7 Nov 2024 13:40:37 +0300 Subject: [PATCH 19/21] Updated hover color --- apps/climatemappedafrica/src/components/Hero/Map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/climatemappedafrica/src/components/Hero/Map.js b/apps/climatemappedafrica/src/components/Hero/Map.js index eab88d671..899508296 100644 --- a/apps/climatemappedafrica/src/components/Hero/Map.js +++ b/apps/climatemappedafrica/src/components/Hero/Map.js @@ -48,8 +48,8 @@ function Map({ onLayerMouseOver(feature.properties.name.toLowerCase()); if (explorePageSlug) { layer.setStyle({ - fillColor: theme.palette.primary.main, - fillOpacity: 0.5, + fillColor: choroplethColor?.fillColor, + fillOpacity: 0.4, }); } }); From 9d50de79859e8dd8181d5cd5ebb76b783b313a71 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 8 Nov 2024 10:55:37 +0300 Subject: [PATCH 20/21] Updated hero component styles --- .../src/components/Hero/Hero.js | 2 +- .../src/components/Hero/Hero.snap.js | 16 +---------- .../src/components/Hero/Legend.js | 28 ++++++++----------- .../src/components/Hero/Map.js | 10 ++----- 4 files changed, 16 insertions(+), 40 deletions(-) diff --git a/apps/climatemappedafrica/src/components/Hero/Hero.js b/apps/climatemappedafrica/src/components/Hero/Hero.js index 9af0e3106..91239fb64 100644 --- a/apps/climatemappedafrica/src/components/Hero/Hero.js +++ b/apps/climatemappedafrica/src/components/Hero/Hero.js @@ -104,7 +104,7 @@ function Hero({ {/* Since map is dynamic-ally loaded, no need for implementation="css" */} - + {center ? ( renders unchanged 1`] = `
renders unchanged 1`] = ` class="MuiBox-root css-70qvj9" >
diff --git a/apps/climatemappedafrica/src/components/Hero/Legend.js b/apps/climatemappedafrica/src/components/Hero/Legend.js index f1a3f8139..77877f2a5 100644 --- a/apps/climatemappedafrica/src/components/Hero/Legend.js +++ b/apps/climatemappedafrica/src/components/Hero/Legend.js @@ -1,5 +1,5 @@ import { RichTypography } from "@commons-ui/legacy"; -import { Box, Tooltip } from "@mui/material"; +import { Box } from "@mui/material"; import PropTypes from "prop-types"; import React, { useState, forwardRef } from "react"; @@ -21,23 +21,17 @@ const Legend = forwardRef(function Legend({ data, title }, ref) { {data.map((item) => ( - - handleMouseEnter(`${item.min} - ${item.max}`)} - onMouseLeave={handleMouseLeave} - sx={{ - backgroundColor: item.color, - height: 24, - minWidth: 24, - cursor: "pointer", - }} - /> - + onMouseEnter={() => handleMouseEnter(`${item.min} - ${item.max}`)} + onMouseLeave={handleMouseLeave} + sx={{ + backgroundColor: item.color, + height: 24, + minWidth: 24, + cursor: "pointer", + }} + /> ))} {hoveredValue && ( { onLayerMouseOver(feature.properties.name.toLowerCase()); if (explorePageSlug) { @@ -55,7 +51,7 @@ function Map({ }); layer.on("mouseout", () => { onLayerMouseOver(null); - layer.setStyle({ ...choroplethColor, fillOpacity: 1 }); + layer.setStyle({ ...choroplethColor, fillOpacity: 1, weight: 1 }); }); layer.on("click", () => { if (explorePageSlug) { @@ -68,7 +64,7 @@ function Map({ }; return ( - + Date: Fri, 8 Nov 2024 11:09:42 +0300 Subject: [PATCH 21/21] Update Map --- apps/climatemappedafrica/src/components/Hero/Map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/climatemappedafrica/src/components/Hero/Map.js b/apps/climatemappedafrica/src/components/Hero/Map.js index 8e813eeb6..c89c1c8a4 100644 --- a/apps/climatemappedafrica/src/components/Hero/Map.js +++ b/apps/climatemappedafrica/src/components/Hero/Map.js @@ -68,8 +68,8 @@ function Map({