From 04d20f724de62d9a4c42c051f72c204a4d7e2ee7 Mon Sep 17 00:00:00 2001 From: Wille Marcel Date: Tue, 21 May 2024 15:57:09 -0300 Subject: [PATCH 1/4] Add Ships/Boats to the moving platform types category --- src/components/timeline/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/timeline/map.js b/src/components/timeline/map.js index 919a367b..656d96db 100644 --- a/src/components/timeline/map.js +++ b/src/components/timeline/map.js @@ -206,7 +206,7 @@ export const MapLegend = ({ } /> - {["Jet", "Prop", "UAV"].includes(platform.type) ? ( + {["Jet", "Prop", "UAV", "Ships/Boats"].includes(platform.type) ? ( ) : ( From 00eefcb8a6ff3f2c7b5be0b0f09f08f5b80ec4e8 Mon Sep 17 00:00:00 2001 From: Wille Marcel Date: Tue, 11 Jun 2024 11:25:11 -0500 Subject: [PATCH 2/4] Fetch endpoints synchronously to avoid timeouts --- gatsby-node.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gatsby-node.js b/gatsby-node.js index ff4dfdfa..d088eb3f 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -165,7 +165,11 @@ exports.sourceNodes = async ({ actions, createContentDigest }) => { campaign_count: "campaigns", } - let responses = await Promise.all(endpoints.map(key => fetchData(key))) + const responses = [] + for (const key of endpoints) { + const response = await fetchData(key) + responses.push(response) + } responses.forEach(response => { if (response.success) { From 38a842cf89267ee101982a444fbd2f0af4280eeb Mon Sep 17 00:00:00 2001 From: Wille Marcel Date: Wed, 5 Jun 2024 19:35:04 -0300 Subject: [PATCH 3/4] Fix stationary tag position --- src/components/cards/card.js | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/components/cards/card.js b/src/components/cards/card.js index 14685088..c99f73bb 100644 --- a/src/components/cards/card.js +++ b/src/components/cards/card.js @@ -15,6 +15,7 @@ const CardHeader = styled.div` justify-items: ${({ imagePosition }) => imagePosition === "left top" ? "flex-start" : "center"}; min-height: 180px; + margin-bottom: 0.5rem; ` const Card = ({ @@ -77,27 +78,26 @@ const Card = ({ )} - {tag && ( -
- {tag} -
- )} {children} + {tag && ( +
+ {tag} +
+ )} {footerList && (
Date: Thu, 6 Jun 2024 10:20:36 -0400 Subject: [PATCH 4/4] Fix snapshot tests --- .../__tests__/__snapshots__/card.test.js.snap | 18 +++++++++--------- .../platform-section.test.js.snap | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/__tests__/__snapshots__/card.test.js.snap b/src/components/__tests__/__snapshots__/card.test.js.snap index 2c59b048..05f9a0ff 100644 --- a/src/components/__tests__/__snapshots__/card.test.js.snap +++ b/src/components/__tests__/__snapshots__/card.test.js.snap @@ -9,7 +9,7 @@ exports[`Card renders card with tag 1`] = ` data-cy="campaigns-card" >
-
- Stationary -
+
+ Stationary +
`; @@ -71,7 +71,7 @@ exports[`Card renders plain card 1`] = ` data-cy="campaigns-card" >