Skip to content

Commit

Permalink
Lazy load the implementer tools
Browse files Browse the repository at this point in the history
  • Loading branch information
brandones committed Mar 11, 2022
1 parent 63f385f commit 1671246
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState, useEffect } from "react";
import Popup from "./popup/popup.component";
import { NotificationActionButton } from "carbon-components-react";
import {
showNotification,
Expand All @@ -11,11 +10,14 @@ import {
showModuleDiagnostics,
togglePopup,
} from "./store";
import { UiEditor } from "./ui-editor/ui-editor";

import { useBackendDependencies } from "./backend-dependencies/useBackendDependencies";
import { hasInvalidDependencies } from "./backend-dependencies/openmrs-backend-dependencies";
import { useTranslation } from "react-i18next";

const Popup = React.lazy(() => import("./popup/popup.component"));
const UiEditor = React.lazy(() => import("./ui-editor/ui-editor"));

function PopupHandler() {
const frontendModules = useBackendDependencies();
const [shouldShowNotification, setShouldShowNotification] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Portal } from "./portal";
import { ExtensionOverlay } from "./extension-overlay.component";
import { ImplementerToolsStore, implementerToolsStore } from "../store";

export function UiEditor() {
export default function UiEditor() {
const { slots, extensions } = useExtensionInternalStore();
const { isOpen: implementerToolsIsOpen } = useStore(implementerToolsStore);

Expand Down

0 comments on commit 1671246

Please sign in to comment.