Skip to content

Commit 9a424ad

Browse files
libs updated
1 parent 03856b1 commit 9a424ad

File tree

6 files changed

+2488
-2319
lines changed

6 files changed

+2488
-2319
lines changed

package.json

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blog",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
@@ -15,53 +15,53 @@
1515
"test": "jest"
1616
},
1717
"dependencies": {
18-
"@reduxjs/toolkit": "^1.6.0",
19-
"babel-plugin-styled-components": "^1.12.0",
18+
"@reduxjs/toolkit": "^1.6.2",
19+
"babel-plugin-styled-components": "^1.13.3",
2020
"beprofiler": "^0.2.3",
21-
"date-fns": "^2.11.1",
22-
"gray-matter": "^4.0.2",
21+
"date-fns": "^2.25.0",
22+
"gray-matter": "^4.0.3",
2323
"i18n-keys": "^1.0.8",
24-
"i18next": "^20.3.1",
24+
"i18next": "^21.3.3",
2525
"lodash": "^4.17.21",
26-
"next": "^10.0.0",
27-
"next-redux-wrapper": "^7.0.2",
28-
"react": "17.0.1",
29-
"react-dom": "17.0.1",
30-
"react-markdown": "^6.0.2",
31-
"react-redux": "^7.2.4",
32-
"react-syntax-highlighter": "^15.4.3",
33-
"rehype-raw": "^5.1.0",
34-
"remark-gfm": "^1.0.0",
35-
"styled-components": "^5.3.0",
36-
"tailwindcss": "^2.1.2",
37-
"twin.macro": "^2.4.2"
26+
"next": "^11.1.2",
27+
"next-redux-wrapper": "^7.0.5",
28+
"react": "17.0.2",
29+
"react-dom": "17.0.2",
30+
"react-markdown": "^7.1.0",
31+
"react-redux": "^7.2.5",
32+
"react-syntax-highlighter": "^15.4.4",
33+
"rehype-raw": "^6.1.0",
34+
"remark-gfm": "^3.0.0",
35+
"styled-components": "^5.3.3",
36+
"tailwindcss": "^2.1.17",
37+
"twin.macro": "^2.8.0"
3838
},
3939
"devDependencies": {
40-
"@babel/core": "^7.14.3",
41-
"@types/jest": "^26.0.23",
42-
"@types/lodash": "^4.14.170",
43-
"@types/node": "^15.6.0",
44-
"@types/react": "^17.0.6",
45-
"@types/react-syntax-highlighter": "^13.5.0",
40+
"@babel/core": "^7.15.8",
41+
"@types/jest": "^27.0.2",
42+
"@types/lodash": "^4.14.176",
43+
"@types/node": "^16.11.3",
44+
"@types/react": "^17.0.31",
45+
"@types/react-syntax-highlighter": "^13.5.2",
4646
"@types/react-test-renderer": "^17.0.1",
47-
"@types/styled-components": "^5.1.9",
48-
"@typescript-eslint/eslint-plugin": "^4.24.0",
49-
"@typescript-eslint/parser": "^4.24.0",
50-
"babel-jest": "^26.6.3",
51-
"eslint": "^7.27.0",
47+
"@types/styled-components": "^5.1.15",
48+
"@typescript-eslint/eslint-plugin": "^5.1.0",
49+
"@typescript-eslint/parser": "^5.1.0",
50+
"babel-jest": "^27.3.1",
51+
"eslint": "^8.0.1",
5252
"eslint-config-prettier": "^8.3.0",
5353
"eslint-plugin-jsx-a11y": "^6.4.1",
54-
"eslint-plugin-prettier": "^3.4.0",
55-
"eslint-plugin-react": "^7.23.2",
54+
"eslint-plugin-prettier": "^4.0.0",
55+
"eslint-plugin-react": "^7.26.1",
5656
"eslint-plugin-react-hooks": "^4.2.0",
57-
"husky": "^6.0.0",
57+
"husky": "^7.0.4",
5858
"identity-obj-proxy": "^3.0.0",
59-
"jest": "^26.6.3",
60-
"jest-watch-typeahead": "^0.6.3",
61-
"lint-staged": "^11.0.0",
62-
"next-sitemap": "^1.6.95",
63-
"prettier": "^2.3.0",
59+
"jest": "^27.3.1",
60+
"jest-watch-typeahead": "^1.0.0",
61+
"lint-staged": "^11.2.3",
62+
"next-sitemap": "^1.6.192",
63+
"prettier": "^2.4.1",
6464
"react-test-renderer": "^17.0.2",
65-
"typescript": "^4.2.4"
65+
"typescript": "^4.4.4"
6666
}
6767
}

src/pages-internal/home/__snapshots__/home.page.test.tsx.snap

Lines changed: 88 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
exports[`HomePage should match the snapshot 1`] = `
44
<div
5-
className="layout__LayoutContainer-ccgz52-0 iBptwS"
5+
className="layout__LayoutContainer-sc-ccgz52-0 fcGbFo"
66
>
77
<div>
88
<header>
99
<div
10-
className="menu__MenuContainer-sc-1jeiv2e-0 bQHOlj"
10+
className="menu__MenuContainer-sc-1jeiv2e-0 iiPuwU"
1111
>
1212
<div
13-
className="menu__MenuItem-sc-1jeiv2e-1 iWFitx"
13+
className="menu__MenuItem-sc-1jeiv2e-1 jrGPUO"
1414
>
1515
<a
1616
href="/"
@@ -21,7 +21,7 @@ exports[`HomePage should match the snapshot 1`] = `
2121
</a>
2222
</div>
2323
<div
24-
className="menu__MenuItem-sc-1jeiv2e-1 iWFitx"
24+
className="menu__MenuItem-sc-1jeiv2e-1 jrGPUO"
2525
>
2626
<a
2727
href="/posts"
@@ -32,7 +32,7 @@ exports[`HomePage should match the snapshot 1`] = `
3232
</a>
3333
</div>
3434
<div
35-
className="menu__MenuItem-sc-1jeiv2e-1 iWFitx"
35+
className="menu__MenuItem-sc-1jeiv2e-1 jrGPUO"
3636
>
3737
<a
3838
href="/about-me"
@@ -44,30 +44,38 @@ exports[`HomePage should match the snapshot 1`] = `
4444
</div>
4545
</div>
4646
</header>
47-
<main>
47+
<main
48+
className="layout__MainContainer-sc-ccgz52-1 inmpeB"
49+
>
50+
<div
51+
className="layout__Side-sc-ccgz52-3 fzUecF"
52+
/>
4853
<div
49-
className="layout__Main-ccgz52-1 jMDwPR"
54+
className="layout__Main-sc-ccgz52-2 jWPXKy"
5055
>
5156
<section>
5257
<div
53-
className="homepage__HomeHeader-b3ui7m-0 kDeYFZ"
58+
className="homepage__HomeHeader-sc-b3ui7m-0 iWQKZL"
5459
>
5560
<h1
56-
className="title__Title-sc-155hqgb-0 gUxpZt"
61+
className="title__Title-sc-155hqgb-0 hCerfg"
5762
>
5863
Last Article
5964
</h1>
6065
</div>
6166
</section>
6267
</div>
68+
<div
69+
className="layout__Side-sc-ccgz52-3 fzUecF"
70+
/>
6371
</main>
6472
</div>
6573
<footer>
6674
<div
67-
className="footer__FooterContainer-ffqoa0-0 xTinp"
75+
className="footer__FooterContainer-sc-ffqoa0-0 hIZdcv"
6876
>
6977
<div
70-
className="footer__FooterItem-ffqoa0-1 dFtdBc"
78+
className="footer__FooterItem-sc-ffqoa0-1 hsjVJe"
7179
>
7280
<a
7381
href="https://www.linkedin.com/in/wojciech-cendrzak-02188236/"
@@ -96,7 +104,6 @@ exports[`HomePage should match the snapshot 1`] = `
96104
<img
97105
alt=""
98106
aria-hidden={true}
99-
role="presentation"
100107
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+"
101108
style={
102109
Object {
@@ -112,6 +119,7 @@ exports[`HomePage should match the snapshot 1`] = `
112119
<img
113120
alt="LinkedIn"
114121
color="#FFF"
122+
data-nimg="intrinsic"
115123
decoding="async"
116124
src="/_next/image?url=%2Ficons%2Fin.svg&w=96&q=75"
117125
srcSet="/_next/image?url=%2Ficons%2Fin.svg&w=48&q=75 1x, /_next/image?url=%2Ficons%2Fin.svg&w=96&q=75 2x"
@@ -138,11 +146,44 @@ exports[`HomePage should match the snapshot 1`] = `
138146
}
139147
}
140148
/>
149+
<noscript>
150+
<img
151+
alt="LinkedIn"
152+
color="#FFF"
153+
data-nimg="intrinsic"
154+
decoding="async"
155+
loading="lazy"
156+
src="/_next/image?url=%2Ficons%2Fin.svg&w=96&q=75"
157+
srcSet="/_next/image?url=%2Ficons%2Fin.svg&w=48&q=75 1x, /_next/image?url=%2Ficons%2Fin.svg&w=96&q=75 2x"
158+
style={
159+
Object {
160+
"border": "none",
161+
"bottom": 0,
162+
"boxSizing": "border-box",
163+
"display": "block",
164+
"height": 0,
165+
"left": 0,
166+
"margin": "auto",
167+
"maxHeight": "100%",
168+
"maxWidth": "100%",
169+
"minHeight": "100%",
170+
"minWidth": "100%",
171+
"objectFit": undefined,
172+
"objectPosition": undefined,
173+
"padding": 0,
174+
"position": "absolute",
175+
"right": 0,
176+
"top": 0,
177+
"width": 0,
178+
}
179+
}
180+
/>
181+
</noscript>
141182
</div>
142183
</a>
143184
</div>
144185
<div
145-
className="footer__FooterItem-ffqoa0-1 dFtdBc"
186+
className="footer__FooterItem-sc-ffqoa0-1 hsjVJe"
146187
>
147188
<a
148189
href="https://github.com/WojciechCendrzak"
@@ -171,7 +212,6 @@ exports[`HomePage should match the snapshot 1`] = `
171212
<img
172213
alt=""
173214
aria-hidden={true}
174-
role="presentation"
175215
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+"
176216
style={
177217
Object {
@@ -187,6 +227,7 @@ exports[`HomePage should match the snapshot 1`] = `
187227
<img
188228
alt="Github"
189229
color="#FFF"
230+
data-nimg="intrinsic"
190231
decoding="async"
191232
src="/_next/image?url=%2Ficons%2Fgit.svg&w=96&q=75"
192233
srcSet="/_next/image?url=%2Ficons%2Fgit.svg&w=48&q=75 1x, /_next/image?url=%2Ficons%2Fgit.svg&w=96&q=75 2x"
@@ -213,6 +254,39 @@ exports[`HomePage should match the snapshot 1`] = `
213254
}
214255
}
215256
/>
257+
<noscript>
258+
<img
259+
alt="Github"
260+
color="#FFF"
261+
data-nimg="intrinsic"
262+
decoding="async"
263+
loading="lazy"
264+
src="/_next/image?url=%2Ficons%2Fgit.svg&w=96&q=75"
265+
srcSet="/_next/image?url=%2Ficons%2Fgit.svg&w=48&q=75 1x, /_next/image?url=%2Ficons%2Fgit.svg&w=96&q=75 2x"
266+
style={
267+
Object {
268+
"border": "none",
269+
"bottom": 0,
270+
"boxSizing": "border-box",
271+
"display": "block",
272+
"height": 0,
273+
"left": 0,
274+
"margin": "auto",
275+
"maxHeight": "100%",
276+
"maxWidth": "100%",
277+
"minHeight": "100%",
278+
"minWidth": "100%",
279+
"objectFit": undefined,
280+
"objectPosition": undefined,
281+
"padding": 0,
282+
"position": "absolute",
283+
"right": 0,
284+
"top": 0,
285+
"width": 0,
286+
}
287+
}
288+
/>
289+
</noscript>
216290
</div>
217291
</a>
218292
</div>

src/pages-internal/post/post.components.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useCallback, useEffect, useState } from 'react';
22
import { Prism as SyntaxHighlighter, SyntaxHighlighterProps } from 'react-syntax-highlighter';
3-
import { Components } from 'react-markdown/src/ast-to-react';
3+
import type { Components } from 'react-markdown';
44
import styled from 'styled-components';
55
import { useRef } from 'react';
66
import { useDispatch } from 'react-redux';

src/pages-internal/post/post.page.logic.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { GetStaticPaths, GetStaticProps } from 'next';
22
import { getPost, getPostIds } from './post.api';
3+
import { Post } from './post.model';
34

45
export const getStaticPaths: GetStaticPaths = async () => {
56
const paths = await getPostIds();
@@ -9,7 +10,11 @@ export const getStaticPaths: GetStaticPaths = async () => {
910
};
1011
};
1112

12-
export const getStaticProps: GetStaticProps = async ({ params }) => {
13+
export interface PostPageProps {
14+
post?: Post;
15+
}
16+
17+
export const getStaticProps: GetStaticProps<PostPageProps> = async ({ params }) => {
1318
if (!params || !params.id || Array.isArray(params.id)) return { props: {} };
1419

1520
const post = getPost(params.id);

src/pages-internal/post/post.page.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Layout } from '../../components/layout';
22
import Head from 'next/head';
33
import { Date } from '../../components/date';
44
import React from 'react';
5-
import { Post } from './post.model';
65
import styled from 'styled-components';
76
import ReactMarkdown from 'react-markdown';
87
import gfm from 'remark-gfm';
@@ -14,13 +13,10 @@ import { translate, translationKeys } from '../../logic/translations/translation
1413
import { Title } from '../../components/title';
1514
import { Content } from '../../components/content';
1615
import { Outline } from '../../components/outline';
17-
18-
export interface PostPageProps {
19-
post: Post;
20-
}
16+
import { PostPageProps } from './post.page.logic';
2117

2218
export const PostPage: React.FC<PostPageProps> = ({ post }) => {
23-
return (
19+
return post ? (
2420
<Layout leftSection={<Outline />}>
2521
<Head>
2622
<title>{post.title}</title>
@@ -55,7 +51,7 @@ export const PostPage: React.FC<PostPageProps> = ({ post }) => {
5551
</BackButton>
5652
</article>
5753
</Layout>
58-
);
54+
) : null;
5955
};
6056

6157
const PostHeader = styled.div`

0 commit comments

Comments
 (0)