This commit is contained in:
Jan Prochazka
2021-01-23 07:22:09 +01:00
parent 37cc86f8d2
commit 451af5d09f
141 changed files with 763 additions and 787 deletions

View File

@@ -31,10 +31,10 @@ export default function PluginsProvider({ children }) {
newPlugins[installed.name] = moduleContent;
}
}
setPlugins((x) =>
setPlugins(x =>
_.pick(
{ ...x, ...newPlugins },
installedPlugins.map((y) => y.name)
installedPlugins.map(y => y.name)
)
);
};
@@ -51,12 +51,12 @@ export function usePlugins() {
return React.useMemo(
() =>
installed
.map((manifest) => ({
.map(manifest => ({
packageName: manifest.name,
manifest,
content: loaded[manifest.name],
}))
.filter((x) => x.content),
.filter(x => x.content),
[installed, loaded]
);
}