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

Upgrade next #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = () => ({
images: {
disableStaticImages: true,
},
webpack: (config, options) => {
config.module.rules.push({
test: /\.(jpe?g|png|webp)$/i,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"autoprefixer": "^10.1.0",
"babel-plugin-prismjs": "^2.0.1",
"date-fns": "^2.16.1",
"next": "10.0.4",
"next": "^11.1.2",
"next-mdx-remote": "^2.1.3",
"postcss": "^8.2.1",
"prism-themes": "^1.5.0",
Expand Down
7 changes: 4 additions & 3 deletions src/components/posts/post-comments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export default function PostComments({ issueId }) {
}
)

const createCommentsUrl = useMemo(() => getCreateCommentsUrl(issueId), [
issueId,
])
const createCommentsUrl = useMemo(
() => getCreateCommentsUrl(issueId),
[issueId]
)

return (
<div ref={elementRef}>
Expand Down
7 changes: 4 additions & 3 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export async function getStaticProps() {
* @constructor
*/
export default function Index({ rawPosts }) {
const posts = useMemo(() => rawPosts.map((post) => new Post(post)), [
rawPosts,
])
const posts = useMemo(
() => rawPosts.map((post) => new Post(post)),
[rawPosts]
)

return (
<div>
Expand Down
Loading