Remove logging and expect version to be passed in top level when initialising plugins

This commit is contained in:
Andrew Kingston 2022-08-22 18:30:13 +01:00
parent c1822ecac6
commit 2961b0ed89
1 changed files with 3 additions and 8 deletions

View File

@ -140,16 +140,11 @@ const createComponentStore = () => {
return customComponentManifest?.[type]?.Component return customComponentManifest?.[type]?.Component
} }
const registerCustomComponent = ({ Component, schema }) => { const registerCustomComponent = ({ Component, schema, version }) => {
if (!Component || !schema?.schema?.name) { if (!Component || !schema?.schema?.name || !version) {
return return
} }
console.log(schema) const component = `plugin/${schema.schema.name}/${version}`
console.log("register", schema.schema.name)
const component = `plugin/${schema.schema.name}/${
schema.schema.version || "2.0.5"
}`
console.log(component)
store.update(state => { store.update(state => {
state.customComponentManifest[component] = { state.customComponentManifest[component] = {
Component, Component,