From f0408147438cc5343e6002523be1360df58fe9f8 Mon Sep 17 00:00:00 2001 From: steveoni Date: Thu, 14 Dec 2023 13:45:35 +0100 Subject: [PATCH] add console to trace error --- pages/[org]/[dataset]/r/[resource]/index.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/[org]/[dataset]/r/[resource]/index.tsx b/pages/[org]/[dataset]/r/[resource]/index.tsx index ffca87c..e2cc381 100644 --- a/pages/[org]/[dataset]/r/[resource]/index.tsx +++ b/pages/[org]/[dataset]/r/[resource]/index.tsx @@ -28,14 +28,20 @@ const Resource: React.FC<{ variables: any }> = ({ variables }) => { return ( ); - if (!data?.dataset) return ; + if (!data?.dataset) { + console.log('======= FROTEND DATASET NOT AVAILABLE =========='); + return ; + } const { result } = data.dataset; // Find right resource const resource = result.resources.find( (item) => item.name === variables.resource ); - if (!resource) return ; + if (!resource) { + console.log('======= FROTEND RESOURCE NOT AVAILABLE =========='); + return ; + } fixTranslations(result); fixTranslations(result.organization);