From 3b8d3fb24b27c709d432d0684e6ec08109e8b45c Mon Sep 17 00:00:00 2001 From: Alex Ramsdell Date: Tue, 14 Nov 2023 12:18:21 -0500 Subject: [PATCH 1/2] fix spelling error. --- src/components/instance/browse/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/instance/browse/index.js b/src/components/instance/browse/index.js index 197a4020d..1bdc2aea3 100644 --- a/src/components/instance/browse/index.js +++ b/src/components/instance/browse/index.js @@ -39,7 +39,7 @@ function NoPrimaryKeyMessage({ table }) { No Primary Key - The table { `'${table}'` } does not have a primary key. The HarperDB Studio does not currently support tables wihtout a primary key defined. Please see the HarperDB documention to see the standard HarperDB querying options. + The table { `'${table}'` } does not have a primary key. The HarperDB Studio does not currently support tables without a primary key defined. Please see the HarperDB documention to see the standard HarperDB querying options. From 71a0f3131b068cdc19a99042aefb97384c1258ae Mon Sep 17 00:00:00 2001 From: Alex Ramsdell Date: Wed, 15 Nov 2023 11:00:38 -0500 Subject: [PATCH 2/2] refactor no primary key check. --- src/components/instance/browse/index.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/components/instance/browse/index.js b/src/components/instance/browse/index.js index 1bdc2aea3..540f8dbe5 100644 --- a/src/components/instance/browse/index.js +++ b/src/components/instance/browse/index.js @@ -92,7 +92,7 @@ function BrowseIndex() { * FIXME: There is a fair amount of logic scattered throughout this * page that could be put in a router-level validation function. * - * Splitting the browse endpoint into /schema/ and /schema/table heirarchy + * Splitting the browse endpoint into /schema/ and /schema/table hierarchy * might ease this. * */ @@ -162,18 +162,16 @@ function BrowseIndex() { onError={(error, componentStack) => addError({ error: { message: error.message, componentStack } })} FallbackComponent={ErrorFallback}> { - hasHashAttr ? ( - schema && table && action === 'csv' && entities.activeTable ? ( - - ) : schema && table && action && entities.activeTable ? ( - - ) : schema && table && entities.activeTable ? ( - - ) : ( - } /> - ) + schema && table && action === 'csv' && entities.activeTable ? ( + + ) : schema && table && action && entities.activeTable ? ( + + ) : schema && table && entities.activeTable ? ( + + ) : schema && table && !hasHashAttr ? ( + ) : - + } /> }