Skip to content

Commit

Permalink
- Fix z-index not being respected issue
Browse files Browse the repository at this point in the history
- Fix react strict mode double rendering issue
  • Loading branch information
chaitanyapotti committed Jan 11, 2023
1 parent e5771c9 commit 32fecc9
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion demo/custom-ui-react-app/src/config/chainConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const CHAIN_CONFIG = {
displayName: "Ethereum Mainnet",
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x1",
rpcTarget: `https://mainnet.infura.io/v3/776218ac4734478c90191dde8cae483c`,
rpcTarget: `https://rpc.ankr.com/eth`,
blockExplorer: "https://etherscan.io/",
ticker: "ETH",
tickerName: "Ethereum",
Expand Down
92 changes: 44 additions & 48 deletions demo/react-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/react-app/src/config/chainConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const CHAIN_CONFIG = {
displayName: "Ethereum Mainnet",
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x1",
rpcTarget: `https://mainnet.infura.io/v3/776218ac4734478c90191dde8cae483c`,
rpcTarget: `https://rpc.ankr.com/eth`,
blockExplorer: "https://etherscan.io/",
ticker: "ETH",
tickerName: "Ethereum",
Expand Down
4 changes: 2 additions & 2 deletions demo/react-app/src/services/web3auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export const Web3AuthProvider: FunctionComponent<IWeb3AuthState> = ({ children,
clientId,
uiConfig: {
defaultLanguage: "en",
theme:"dark",
}
theme: "dark",
},
});
const adapter = new OpenloginAdapter({ adapterSettings: { network: web3AuthNetwork, clientId } });
web3AuthInstance.configureAdapter(adapter);
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/loginModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ import { ExternalWalletEventType, LOGIN_MODAL_EVENTS, MODAL_STATUS, ModalState,

const DEFAULT_LOGO_URL = "https://images.web3auth.io/web3auth-logo.svg";
function createWrapper(parentZIndex: string): HTMLElement {
const existingWrapper = document.getElementById("w3a-container");
if (existingWrapper) return existingWrapper;

const parent = document.createElement("section");
parent.classList.add("w3a-parent-container");
parent.style.zIndex = parentZIndex;
parent.style.position = "relative";
const wrapper = document.createElement("section");
wrapper.setAttribute("id", "w3a-container");
parent.appendChild(wrapper);
Expand Down

0 comments on commit 32fecc9

Please sign in to comment.