We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91c5d06 commit a979b27Copy full SHA for a979b27
src/App.tsx
@@ -8,13 +8,18 @@ import { Porto } from "porto";
8
9
import type { EIP6963ProviderInfo, EIP1193, AnnounceEvent } from "./types.ts";
10
11
+declare global {
12
+ interface Window {
13
+ __PORTO__?: Porto;
14
+ }
15
+}
16
const ALL_CHAINS: Chain[] = Object.values(chains) as Chain[];
17
const byId = (id: number) => ALL_CHAINS.find((c) => c.id === id);
18
19
export function App() {
20
useEffect(() => {
- if (!(window as any).__PORTO__) {
- (window as any).__PORTO__ = Porto.create();
21
+ if (!window.__PORTO__) {
22
+ window.__PORTO__ = Porto.create();
23
}
24
}, []);
25
0 commit comments