Skip to content

Commit

Permalink
Merge pull request #637 from NASA-IMPACT/develop
Browse files Browse the repository at this point in the history
Production update - Jun 11th
  • Loading branch information
willemarcel authored Jun 11, 2024
2 parents a015f1b + 8230c5a commit b5cd36b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 32 deletions.
6 changes: 5 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 9 additions & 9 deletions src/components/__tests__/__snapshots__/card.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`Card renders card with tag 1`] = `
data-cy="campaigns-card"
>
<div
className="card__CardHeader-sc-16fz0z7-0 lmhbIy"
className="card__CardHeader-sc-16fz0z7-0 gbZyqC"
>
<div
className="card___StyledDiv2-sc-16fz0z7-4 cPSZeM"
Expand All @@ -33,12 +33,6 @@ exports[`Card renders card with tag 1`] = `
</g>
</svg>
</div>
<div
className="card___StyledDiv3-sc-16fz0z7-5 hcAeMi"
data-cy="stationary-tag"
>
Stationary
</div>
</div>
<div>
<big
Expand All @@ -58,6 +52,12 @@ exports[`Card renders card with tag 1`] = `
description....
</p>
</div>
<div
className="card___StyledDiv3-sc-16fz0z7-5 hugbRo"
data-cy="stationary-tag"
>
Stationary
</div>
</a>
</div>
`;
Expand All @@ -71,7 +71,7 @@ exports[`Card renders plain card 1`] = `
data-cy="campaigns-card"
>
<div
className="card__CardHeader-sc-16fz0z7-0 lmhbIy"
className="card__CardHeader-sc-16fz0z7-0 gbZyqC"
>
<div
className="card___StyledDiv2-sc-16fz0z7-4 cPSZeM"
Expand Down Expand Up @@ -127,7 +127,7 @@ exports[`Card renders with footer list 1`] = `
data-cy="campaigns-card"
>
<div
className="card__CardHeader-sc-16fz0z7-0 lmhbIy"
className="card__CardHeader-sc-16fz0z7-0 gbZyqC"
>
<div
className="card___StyledDiv2-sc-16fz0z7-4 cPSZeM"
Expand Down
38 changes: 19 additions & 19 deletions src/components/cards/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down Expand Up @@ -77,27 +78,26 @@ const Card = ({
<Placeholder size="medium" color={colors[mode].text} />
</div>
)}
{tag && (
<div
css={`
{
grid-area: 1 / 1;
align-self: flex-end;
justify-self: flex-start;
text-transform: uppercase;
border: 1px solid;
padding: 0.25rem;
margin: 1rem 0;
background-color: ${colors[mode].background};
}
`}
data-cy={`${tag.toLowerCase()}-tag`}
>
{tag}
</div>
)}
</CardHeader>
{children}
{tag && (
<div
css={`
{
grid-area: 1 / 1;
display: inline-block;
text-transform: uppercase;
border: 1px solid;
padding: 0.25rem;
margin: 1rem 0;
background-color: ${colors[mode].background};
}
`}
data-cy={`${tag.toLowerCase()}-tag`}
>
{tag}
</div>
)}
</Link>
{footerList && (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/timeline/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const MapLegend = ({
}
/>
<LegendText checked={selectedPlatforms.includes(platform.name)}>
{["Jet", "Prop", "UAV"].includes(platform.type) ? (
{["Jet", "Prop", "UAV", "Ships/Boats"].includes(platform.type) ? (
<LineIcon color="#1B9E77" size="text" />
) : (
<CircleIcon color="#E8E845" size="extra-tiny" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ exports[`Platform Section displays content 1`] = `
href="/platform/J-31"
>
<div
className="card__CardHeader-sc-16fz0z7-0 lmhbIy"
className="card__CardHeader-sc-16fz0z7-0 gbZyqC"
>
<div
className="card___StyledDiv2-sc-16fz0z7-4 cPSZeM"
Expand Down Expand Up @@ -250,7 +250,7 @@ exports[`Platform Section displays content 1`] = `
href="/platform/Aerosonde"
>
<div
className="card__CardHeader-sc-16fz0z7-0 lmhbIy"
className="card__CardHeader-sc-16fz0z7-0 gbZyqC"
>
<div
className="card___StyledDiv2-sc-16fz0z7-4 cPSZeM"
Expand Down

0 comments on commit b5cd36b

Please sign in to comment.