From 34c69fb43616af5259894add536145162e958cae Mon Sep 17 00:00:00 2001 From: Sergey Tolstokorov Date: Tue, 10 Jan 2023 12:36:53 +0700 Subject: [PATCH] fix: global link color bug --- src/VenomConnect.tsx | 10 +++++----- src/components/Modal.tsx | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/VenomConnect.tsx b/src/VenomConnect.tsx index dcdc584..2dcea30 100644 --- a/src/VenomConnect.tsx +++ b/src/VenomConnect.tsx @@ -5,7 +5,7 @@ import { getPromiseRaw, ProviderController } from "./controllers"; import { EventController } from "./controllers/EventController"; import { ToggleExtensionWindow, - toggleExtensionWindow + toggleExtensionWindow, } from "./helpers/backdrop"; import { CLOSE_EVENT, @@ -14,7 +14,7 @@ import { Events, EXTENSION_AUTH_EVENT, EXTENSION_WINDOW_CLOSED_EVENT, - SELECT_EVENT + SELECT_EVENT, } from "./helpers/events"; import * as allProviders from "./providers"; import { getThemeConfig, ThemeNameList, themesList } from "./themes"; @@ -23,11 +23,13 @@ import { SimpleFunction, ThemeConfig, UserProvidersOptions, - VenomConnectOptions + VenomConnectOptions, } from "./types"; export const libName = "VenomConnect"; +export const VENOM_CONNECT_MODAL_ID = "VENOM_CONNECT_MODAL_ID"; + let oldRoot: Root | undefined = undefined; const _getDefaultVenomNetworkNameById = (networkId: number) => { @@ -416,8 +418,6 @@ class VenomConnect { } private renderModal() { - const VENOM_CONNECT_MODAL_ID = "VENOM_CONNECT_MODAL_ID"; - const oldContainer = document.getElementById(VENOM_CONNECT_MODAL_ID); if (!oldContainer) { diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index aaf2bce..a0c912c 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -10,6 +10,7 @@ import { SimpleFunction, ThemeConfig, } from "../types"; +import { VENOM_CONNECT_MODAL_ID } from "../VenomConnect"; import AbstractPopUp, { SECONDS } from "./AbstractPopUp"; import { CardManager } from "./CardManager"; import { QrCard } from "./InnerCard"; @@ -471,9 +472,9 @@ export const Modal = ({ />