From 641a52598902346e3ba2e948fc757df0617295a3 Mon Sep 17 00:00:00 2001 From: koishichito <118346971+koishichito@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:50:23 +0900 Subject: [PATCH] Fix typecheck --- frontend/package.json | 3 ++- frontend/src/pages/home.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 3ad24cd..177d035 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -7,7 +7,8 @@ "build": "next build", "start": "next start", "lint": "next lint --dir src", - "format": "next lint --fix --dir src" + "format": "next lint --fix --dir src", + "typecheck": "tsc --noEmit" }, "dependencies": { "@emotion/cache": "^11.13.1", diff --git a/frontend/src/pages/home.tsx b/frontend/src/pages/home.tsx index 886692a..365806e 100644 --- a/frontend/src/pages/home.tsx +++ b/frontend/src/pages/home.tsx @@ -22,7 +22,7 @@ const Index: NextPage = () => { fetch('https://jsonplaceholder.typicode.com/photos') .then((response) => { if (!response.ok) { - throw new Error('Network response was not ok') + return; } return response.json() })