From fa753f41295d6cbd4027433d8602a90022153890 Mon Sep 17 00:00:00 2001 From: Remko Date: Wed, 24 Jan 2024 12:59:19 +0100 Subject: [PATCH] error catch --- pwa/package.json | 4 +--- pwa/src/templates/resultTemplate/ResultTemplate.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pwa/package.json b/pwa/package.json index 2ccb68a..2c35258 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -4,9 +4,7 @@ "private": true, "description": "Product Website Template", "author": "Conduction", - "keywords": [ - "gatsby" - ], + "keywords": ["gatsby"], "scripts": { "develop": "gatsby develop", "start": "gatsby develop", diff --git a/pwa/src/templates/resultTemplate/ResultTemplate.tsx b/pwa/src/templates/resultTemplate/ResultTemplate.tsx index bc7a291..9ddb44f 100644 --- a/pwa/src/templates/resultTemplate/ResultTemplate.tsx +++ b/pwa/src/templates/resultTemplate/ResultTemplate.tsx @@ -35,7 +35,7 @@ export const ResultTemplate: React.FC = ({ id }) => { setToken(publicKey); } if (!token) { - getToken(); + getToken().catch((err) => (setResult(false), setData(err.message))); } });