Skip to content

Commit

Permalink
fix: test render
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Oct 23, 2023
1 parent 6192a03 commit 23851d4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions apps/ledger-live-desktop/src/renderer/init.tsx
Expand Up @@ -8,7 +8,7 @@ import { checkLibs } from "@ledgerhq/live-common/sanityChecks";
import { importPostOnboardingState } from "@ledgerhq/live-common/postOnboarding/actions";
import i18n from "i18next";
import { webFrame, ipcRenderer } from "electron";
import { createRoot } from "react-dom/client";
import { render } from "react-dom";
import moment from "moment";
import each from "lodash/each";
import { reload, getKey, loadLSS } from "~/renderer/storage";
Expand Down Expand Up @@ -47,7 +47,7 @@ import { Device } from "@ledgerhq/live-common/hw/actions/types";
import { listCachedCurrencyIds } from "./bridge/cache";
import { LogEntry } from "winston";

const domNode = document.getElementById("react-root");
const rootNode = document.getElementById("react-root");
const TAB_KEY = 9;

async function init() {
Expand Down Expand Up @@ -246,9 +246,8 @@ async function init() {
};
}
function r(Comp: JSX.Element) {
if (domNode) {
const rootNode = createRoot(domNode);
rootNode.render(Comp);
if (rootNode) {
render(Comp, rootNode);
}
}
init()
Expand Down

0 comments on commit 23851d4

Please sign in to comment.