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

Production update - Jun 11th #637

Merged
merged 8 commits into from
Jun 11, 2024
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
Loading