migration additions -- part 4 (isolate mobx for app & extensions)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2021-04-20 15:18:20 +03:00
1 parent 08787dce1f
commit a7ebf7cb3c
17 files changed
+33 -39

No files matched your search

@@ -2,7 +2,6 @@
import type { IconProps } from "../../renderer/components/icon";
import type React from "react";
import type { PageTarget, RegisteredPage } from "./page-registry";
import { action, makeObservable } from "mobx";
import { BaseRegistry } from "./base-registry";
import { LensExtension } from "../lens-extension";
@@ -22,12 +21,6 @@ export interface PageMenuComponents {
}
export class PageMenuRegistry<T extends PageMenuRegistration> extends BaseRegistry<T> {
constructor() {
super();
makeObservable(this);
}
add(items: T[], ext: LensExtension) {
const normalizedItems = items.map(menuItem => {
menuItem.target = {