From 2961b0ed89f81925841598631f034199b49232d9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 22 Aug 2022 18:30:13 +0100 Subject: [PATCH] Remove logging and expect version to be passed in top level when initialising plugins --- packages/client/src/stores/components.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/client/src/stores/components.js b/packages/client/src/stores/components.js index 90a0c903f2..f12f26ecfb 100644 --- a/packages/client/src/stores/components.js +++ b/packages/client/src/stores/components.js @@ -140,16 +140,11 @@ const createComponentStore = () => { return customComponentManifest?.[type]?.Component } - const registerCustomComponent = ({ Component, schema }) => { - if (!Component || !schema?.schema?.name) { + const registerCustomComponent = ({ Component, schema, version }) => { + if (!Component || !schema?.schema?.name || !version) { return } - console.log(schema) - console.log("register", schema.schema.name) - const component = `plugin/${schema.schema.name}/${ - schema.schema.version || "2.0.5" - }` - console.log(component) + const component = `plugin/${schema.schema.name}/${version}` store.update(state => { state.customComponentManifest[component] = { Component,