Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ft/climatemapped-build-fix #988

Merged
merged 9 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/climatemappedafrica-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 }}"
Expand Down
1 change: 1 addition & 0 deletions apps/climatemappedafrica/src/components/Hero/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Hero.propTypes = {
featuredLocations: PropTypes.arrayOf(PropTypes.shape({})),
properties: PropTypes.shape({}),
level: PropTypes.string,
explorePageSlug: PropTypes.string,
};

export default Hero;
18 changes: 11 additions & 7 deletions apps/climatemappedafrica/src/components/Hero/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -55,9 +57,11 @@ function Map({
});
});
layer.on("click", () => {
router.push(
`/${explorePageSlug}/${feature.properties.code.toLowerCase()}`,
);
if (explorePageSlug) {
router.push(
`/${explorePageSlug}/${feature.properties.code.toLowerCase()}`,
);
}
});
}
};
Expand Down
3 changes: 2 additions & 1 deletion apps/climatemappedafrica/src/lib/data/blockify/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default async function hero(block, _api, _context, { hurumap }) {
const {
profilePage,
rootGeography: { center, code, hasData: pinRootGeography },
enableHURUMap,
} = hurumap;
koechkevin marked this conversation as resolved.
Show resolved Hide resolved
const { slug: explorePageSlug } = profilePage;
const { geometries } = await fetchProfileGeography(code.toLowerCase());
Expand All @@ -37,7 +38,7 @@ export default async function hero(block, _api, _context, { hurumap }) {
...block,
boundary,
center,
explorePageSlug,
explorePageSlug: enableHURUMap ? explorePageSlug : null,
koechkevin marked this conversation as resolved.
Show resolved Hide resolved
featuredLocations,
level,
pinRootGeography,
Expand Down
Loading