Skip to content

Commit 9e0ce53

Browse files
committed
fix linting
Signed-off-by: Alex Matson <[email protected]>
1 parent 1b42e0c commit 9e0ce53

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

examples/ping/src/hooks/useAccounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function useAccounts(status?: sdk.dappAPI.StatusEvent) {
2020
)
2121
})
2222
}
23-
}, [status])
23+
}, [status, setErrorMsg])
2424

2525
useEffect(() => {
2626
if (status?.isConnected) {

examples/ping/src/main.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
import { StrictMode } from 'react'
1+
import { StrictMode, useState } from 'react'
22
import { createRoot } from 'react-dom/client'
33
import './index.css'
44
import App from './App.tsx'
5-
import { ErrorProvider } from './ErrorContext.tsx'
5+
import { ErrorContext } from './ErrorContext.tsx'
6+
7+
export function ErrorProvider({ children }: { children: React.ReactNode }) {
8+
const [errorMsg, setErrorMsg] = useState('')
9+
10+
return (
11+
<ErrorContext.Provider value={{ errorMsg, setErrorMsg }}>
12+
{children}
13+
</ErrorContext.Provider>
14+
)
15+
}
616

717
createRoot(document.getElementById('root')!).render(
818
<StrictMode>

0 commit comments

Comments
 (0)