1
0
Fork 0
mirror of synced 2024-09-12 07:27:20 +12:00

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

View file

@ -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,