From 86a3caa881568c5cfe0d732a3132f8f6e6e7aa3e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 21 Jan 2021 15:49:58 +0000 Subject: [PATCH] Remove unused vars --- .../store/screenTemplates/index.js | 1 - .../client/src/utils/enrichDataBinding.js | 22 ------------------- 2 files changed, 23 deletions(-) diff --git a/packages/builder/src/builderStore/store/screenTemplates/index.js b/packages/builder/src/builderStore/store/screenTemplates/index.js index 6feb91f17c..7272f3514c 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/index.js +++ b/packages/builder/src/builderStore/store/screenTemplates/index.js @@ -4,7 +4,6 @@ import rowListScreen from "./rowListScreen" import emptyNewRowScreen from "./emptyNewRowScreen" import createFromScratchScreen from "./createFromScratchScreen" import emptyRowDetailScreen from "./emptyRowDetailScreen" -import { uuid } from "builderStore/uuid" const allTemplates = tables => [ createFromScratchScreen, diff --git a/packages/client/src/utils/enrichDataBinding.js b/packages/client/src/utils/enrichDataBinding.js index f2b992819b..b8c5020c74 100644 --- a/packages/client/src/utils/enrichDataBinding.js +++ b/packages/client/src/utils/enrichDataBinding.js @@ -26,25 +26,3 @@ export const enrichDataBinding = async (input, context) => { export const enrichDataBindings = async (props, context) => { return await processObject(cloneDeep(props), context) } - -/** - * Recurses through an object and enriches all string props found. - */ -const recursiveEnrich = (props, context) => { - if (typeof props !== "object") { - return - } - let keys = [] - if (Array.isArray(props)) { - keys = Array.from(props.keys()) - } else if (typeof props === "object") { - keys = Object.keys(props || {}) - } - keys.forEach(key => { - if (typeof props[key] === "string") { - props[key] = enrichDataBinding(props[key], context) - } else { - recursiveEnrich(props[key], context) - } - }) -}