Skip to content

Commit a979b27

Browse files
zerosnacksCopilot
andauthored
Update src/App.tsx
Co-authored-by: Copilot <[email protected]>
1 parent 91c5d06 commit a979b27

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/App.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ import { Porto } from "porto";
88

99
import type { EIP6963ProviderInfo, EIP1193, AnnounceEvent } from "./types.ts";
1010

11+
declare global {
12+
interface Window {
13+
__PORTO__?: Porto;
14+
}
15+
}
1116
const ALL_CHAINS: Chain[] = Object.values(chains) as Chain[];
1217
const byId = (id: number) => ALL_CHAINS.find((c) => c.id === id);
1318

1419
export function App() {
1520
useEffect(() => {
16-
if (!(window as any).__PORTO__) {
17-
(window as any).__PORTO__ = Porto.create();
21+
if (!window.__PORTO__) {
22+
window.__PORTO__ = Porto.create();
1823
}
1924
}, []);
2025

0 commit comments

Comments
 (0)