Skip to content

Commit edd08db

Browse files
committed
upgrade next and react
1 parent dd04930 commit edd08db

File tree

7 files changed

+393
-703
lines changed

7 files changed

+393
-703
lines changed

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,12 @@ module.exports = {
4848
'react-hooks/exhaustive-deps': 0,
4949

5050
semi: ['error', 'never'],
51+
// mac / windows end of line
52+
'prettier/prettier': [
53+
'error',
54+
{
55+
endOfLine: 'auto',
56+
},
57+
],
5158
},
5259
}

next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
32
/// <reference types="next/image-types/global" />
43

54
// NOTE: This file should not be edited

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"dependencies": {
2929
"border-box.css": "^1.0.0",
3030
"framer-motion": "^4.1.17",
31-
"next": "^11.1.2",
31+
"next": "^12.2.5",
3232
"normalize.css": "^8.0.1",
33-
"react": "^17.0.2",
34-
"react-dom": "^17.0.2",
33+
"react": "^18.2.0",
34+
"react-dom": "^18.2.0",
3535
"react-modal": "^3.14.3",
36-
"styled-components": "^5.3.3"
36+
"styled-components": "^5.3.5"
3737
},
3838
"devDependencies": {
3939
"@next/eslint-plugin-next": "^11.1.2",
@@ -45,15 +45,15 @@
4545
"@testing-library/react": "^12.1.2",
4646
"@testing-library/user-event": "^13.5.0",
4747
"@types/jest": "^27.0.2",
48-
"@types/react": "^17.0.30",
49-
"@types/react-dom": "^17.0.10",
48+
"@types/react": "^18.0.17",
49+
"@types/react-dom": "^18.0.6",
5050
"@types/react-modal": "^3.13.1",
51-
"@types/styled-components": "^5.1.15",
51+
"@types/styled-components": "^5.1.26",
5252
"@typescript-eslint/eslint-plugin": "^5.19.0",
5353
"@typescript-eslint/parser": "^5.19.0",
5454
"babel-plugin-styled-components": "^1.13.3",
5555
"cypress": "^9.5.4",
56-
"eslint": "^8.12.0",
56+
"eslint": "^8.22.0",
5757
"eslint-config-airbnb": "^18.2.1",
5858
"eslint-config-prettier": "^8.3.0",
5959
"eslint-plugin-cypress": "^2.12.1",

pages/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const Home = () => (
2525
/>
2626
</Head>
2727
<App />
28-
<Script strategy="afterInteractive">{GA}</Script>
28+
<Script id="ga-script" strategy="afterInteractive">
29+
{GA}
30+
</Script>
2931
</>
3032
)
3133

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import styled from 'styled-components'
2+
3+
const Svg = styled.svg`
4+
height: 80%;
5+
transition: transform 200ms linear;
6+
width: auto;
7+
8+
&:hover {
9+
transform: scale(1.1);
10+
}
11+
`
12+
const LatticeIcon = ({}) => (
13+
<Svg viewBox="0 0 24 24" focusable="false" role="img">
14+
<title>Lattice Logo</title>
15+
<g fill="currentColor" xmlns="http://www.w3.org/2000/svg">
16+
<path
17+
fillRule="evenodd"
18+
clipRule="evenodd"
19+
d="M6.83991 14.4457L4.06288 11.6064C3.591 11.1239 2.82594 11.1239 2.35391 11.6064C1.88203 12.0888 1.88203 12.8711 2.35391 13.3537L5.98543 17.0667C6.4573 17.5492 7.22252 17.5492 7.69439 17.0667L11.1125 13.5718L9.40366 11.8244L6.83991 14.4457Z"
20+
fill="#1AAD94"
21+
/>{' '}
22+
<path
23+
fillRule="evenodd"
24+
clipRule="evenodd"
25+
d="M17.3073 8.98574L11.9672 14.4457L6.6266 8.98512C6.15457 8.5025 5.38951 8.5025 4.91763 8.98512C4.44575 9.46759 4.44575 10.2498 4.91763 10.7325L11.1128 17.0667C11.5846 17.5491 12.3497 17.5491 12.8217 17.0667L19.0162 10.7331C19.4881 10.2505 19.4881 9.46821 19.0162 8.98574C18.5442 8.50327 17.7791 8.50327 17.3073 8.98574Z"
26+
fill="#F2AE20"
27+
/>
28+
<path
29+
fillRule="evenodd"
30+
clipRule="evenodd"
31+
d="M21.5798 13.3542L17.9489 17.0667C17.4771 17.5491 16.712 17.5491 16.2401 17.0667L7.48123 8.11115C7.00935 7.62868 7.00935 6.84644 7.48123 6.36397C7.95326 5.88134 8.71832 5.88134 9.1902 6.36397L17.0944 14.4457L19.8709 11.6069C20.3429 11.1244 21.108 11.1244 21.5798 11.6069C22.0517 12.0895 22.0517 12.8718 21.5798 13.3542Z"
32+
fill="#E76450"
33+
/>
34+
<path
35+
fillRule="evenodd"
36+
clipRule="evenodd"
37+
d="M16.4526 6.36455C15.9807 5.88208 15.2156 5.88208 14.7436 6.36455L9.40356 11.8245L11.1125 13.5718L16.4526 8.11189C16.9244 7.62927 16.9244 6.84703 16.4526 6.36455Z"
38+
fill="#1AAD94"
39+
/>
40+
</g>
41+
</Svg>
42+
)
43+
44+
export default LatticeIcon

src/styles/global.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createGlobalStyle } from 'styled-components'
22

33
import { palette } from './colors'
44

5-
export default createGlobalStyle`
5+
const GlobalStyles = createGlobalStyle`
66
${palette}
77
88
body {
@@ -32,3 +32,5 @@ export default createGlobalStyle`
3232
margin: 0;
3333
}
3434
`
35+
36+
export default GlobalStyles

0 commit comments

Comments
 (0)