Skip to content

Commit a97f7f2

Browse files
authored
fix: build (#806)
* fix: node version in the cypress workflow * chore: remove unused symbols * chore: update package lock * fix: add missing dependency for React.useEffect * chore: cosmetics/indentation * chore: sync and upgrade some actions versions
1 parent b8ffd84 commit a97f7f2

File tree

7 files changed

+36
-7686
lines changed

7 files changed

+36
-7686
lines changed

.github/workflows/cypress.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ jobs:
1717
node-version: [16.x]
1818

1919
steps:
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
2024
- name: Checkout repository
21-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2226
- name: Cypress run
23-
uses: cypress-io/github-action@v2
27+
uses: cypress-io/github-action@v6
2428
with:
2529
build: npm run build
2630
start: npm start

.github/workflows/index.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ jobs:
1818
# The type of runner that the job will run on
1919
runs-on: ubuntu-latest
2020

21+
strategy:
22+
matrix:
23+
node-version: [16.x]
24+
2125
# Steps represent a sequence of tasks that will be executed as part of the job
2226
steps:
2327
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
2529

2630
- name: Setup Node.js
27-
uses: actions/setup-node@v2
31+
uses: actions/setup-node@v4
2832
with:
29-
node-version: '16.x'
33+
node-version: ${{ matrix.node-version }}
3034

3135
- name: Cache dependencies
3236
uses: actions/cache@v4

.github/workflows/lighthouse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
node-version: [16.x]
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
- uses: actions/cache@v4
2020
with:
2121
path: ~/.npm
2222
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2323
restore-keys: |
2424
${{ runner.os }}-node-
2525
- name: Use Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v2
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
- name: Install dependencies

components/site/baseNavigation.tsx

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import React from 'react';
22
import { getWindow } from 'utils/ssr';
33
import Link from 'next/link';
44
import { Box, BoxProps, ScreenReaderOnly, styles } from '@sparkpost/matchbox';
5-
import {
6-
KeyboardArrowDown,
7-
KeyboardArrowUp,
8-
} from '@sparkpost/matchbox-icons';
5+
import { KeyboardArrowDown, KeyboardArrowUp } from '@sparkpost/matchbox-icons';
96
import styled from 'styled-components';
107
import css from '@styled-system/css';
118
import { tokens } from '@sparkpost/design-tokens';
@@ -36,22 +33,22 @@ export const StyledLink = styled.a<{ $active?: boolean; $level?: number }>`
3633
&:active {
3734
text-decoration: none;
3835
${({ $active, $level }) =>
39-
css({
40-
py: '200',
41-
pr: '700',
42-
pl: `calc(${tokens.spacing_500} + ${tokens.spacing_200} * ${$level})`,
43-
bg: $active ? 'blue.700' : 'transparent',
44-
color: $active ? 'white' : 'gray.900',
45-
})}
36+
css({
37+
py: '200',
38+
pr: '700',
39+
pl: `calc(${tokens.spacing_500} + ${tokens.spacing_200} * ${$level})`,
40+
bg: $active ? 'blue.700' : 'transparent',
41+
color: $active ? 'white' : 'gray.900',
42+
})}
4643
}
4744
4845
&:hover {
4946
${({ $active }) => {
50-
return css({
51-
bg: $active ? 'blue.700' : 'gray.200',
52-
color: $active ? 'white' : 'gray.900',
53-
});
54-
}}
47+
return css({
48+
bg: $active ? 'blue.700' : 'gray.200',
49+
color: $active ? 'white' : 'gray.900',
50+
});
51+
}}
5552
}
5653
`;
5754

@@ -116,15 +113,15 @@ const Chevron = (props: { expanded: boolean }): JSX.Element => {
116113
return expanded ? <KeyboardArrowUp size={18} /> : <KeyboardArrowDown size={18} />;
117114
};
118115

119-
const StyledChevronWrapper = styled(Box) <BoxProps & { $active?: boolean }>`
116+
const StyledChevronWrapper = styled(Box)<BoxProps & { $active?: boolean }>`
120117
${styles.buttonReset}
121118
cursor: pointer;
122119
&:hover {
123120
${({ $active }) => {
124-
return css({
125-
color: $active ? 'white' : 'blue.700',
126-
});
127-
}}
121+
return css({
122+
color: $active ? 'white' : 'blue.700',
123+
});
124+
}}
128125
}
129126
${({ $active }) => {
130127
return css({
@@ -148,7 +145,7 @@ const Item = (props: NavigationItemProps): JSX.Element => {
148145

149146
setExpanded(isExpanded);
150147
setActive(isActive);
151-
}, [link, activeUrl]);
148+
}, [link, activeUrl, hasActiveChild]);
152149

153150
return (
154151
<Box fontSize="200" lineHeight="200" position="relative">

components/site/docsHomePageContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Feedback, HelpOutline, QuestionAnswer } from '@sparkpost/matchbox-icons';
2+
import { Feedback, HelpOutline } from '@sparkpost/matchbox-icons';
33
import Link from 'next/link';
44
import { Elixir, PHP, Java, NodeMailer, Python, Node, Go } from './icons';
55
import BaseHomePageContent, { SimpleStyledLink } from './baseHomePageContent';

components/site/navigation.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import Link from 'next/link';
33
import { Box } from '@sparkpost/matchbox';
44
import {
5-
Forum,
65
PeopleOutline,
76
Code,
87
DeviceHub,

0 commit comments

Comments
 (0)