diff --git a/apps/frontend/package.json b/apps/frontend/package.json index cde273943..a21044ed3 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -6,7 +6,7 @@ "build": "next build", "dev": "next dev", "develop": "npm run dev", - "eslint": "next lint", + "eslint": "next lint --max-warnings 0", "format": "prettier --write .", "init": "shx cp -n sample.env .env", "prettier-check": "prettier --check .", diff --git a/apps/frontend/src/components/editor-drawer.jsx b/apps/frontend/src/components/editor-drawer.jsx index 305d1fb01..26405d04a 100644 --- a/apps/frontend/src/components/editor-drawer.jsx +++ b/apps/frontend/src/components/editor-drawer.jsx @@ -78,7 +78,7 @@ const EditorDrawer = ({ setAuthorName(post.attributes.author.data.attributes.name); } - }, [post]); + }, [post, handlePostTagId]); const handleFileInputChange = (event) => { const file = event.target.files[0]; diff --git a/apps/frontend/src/components/post-form.jsx b/apps/frontend/src/components/post-form.jsx index 660ab1694..43850b3cc 100644 --- a/apps/frontend/src/components/post-form.jsx +++ b/apps/frontend/src/components/post-form.jsx @@ -69,10 +69,10 @@ const PostForm = ({ tags, user, authors, post }) => { setUnsavedChanges(true); }; - const handlePostTagId = (value) => { + const handlePostTagId = useCallback((value) => { setPostTagId([...value]); setUnsavedChanges(true); - }; + }, []); const handleAuthorChange = (author) => { setAuthor(author);