diff --git a/.eslintrc.json b/.eslintrc.json index 242520f..cfca33b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { "extends": "next/core-web-vitals", "rules": { - "semi": ["warn", "always"], + "semi": ["warn", "always", { "omitLastInOneLineBlock": true }], "quotes": ["warn", "double"], "eqeqeq": "error" } diff --git a/components/ProjectModal.tsx b/components/ProjectModal.tsx index 02520ca..c27bfdc 100644 --- a/components/ProjectModal.tsx +++ b/components/ProjectModal.tsx @@ -34,30 +34,30 @@ const ProjectModal: NextPage = ({ project, visible, setVisible }) => } }); }); - } else if (project === "") setProjectData(projectEmpty) - }, [project]) + } else if (project === "") setProjectData(projectEmpty); + }, [project, projectEmpty, projectNotFoundHtml, projectServerErrorHtml]); useEffect(() => { if (projectData && containerRef.current && projectData !== "") { containerRef.current.innerHTML = projectData; } - }, [projectData, visible]) + }, [projectData, visible]); const onEscClose = (e: React.KeyboardEvent) => { if (e.key === "Escape") { e.preventDefault(); setVisible(false); } - } + }; - if (!visible) return <> + if (!visible) return <>; return
-
-} + ; +}; export default ProjectModal; \ No newline at end of file diff --git a/pages/api/get_project.ts b/pages/api/get_project.ts index 9f3e46a..0cef4ac 100644 --- a/pages/api/get_project.ts +++ b/pages/api/get_project.ts @@ -19,7 +19,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse { e.preventDefault(); setModalVisible(false); } - } + }; return (