fix: adds missing setLoading toggle
This commit is contained in:
parent
1ca7a5cfd1
commit
22c0a7c456
@ -213,11 +213,14 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
|
|||||||
|
|
||||||
const createClient = useCallback(async () => {
|
const createClient = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
const _client = await Client.init({
|
const _client = await Client.init({
|
||||||
logger: DEFAULT_LOGGER,
|
logger: DEFAULT_LOGGER,
|
||||||
relayUrl: DEFAULT_RELAY_URL,
|
relayUrl: DEFAULT_RELAY_URL,
|
||||||
projectId: DEFAULT_PROJECT_ID,
|
projectId: DEFAULT_PROJECT_ID,
|
||||||
});
|
});
|
||||||
|
|
||||||
setClient(_client);
|
setClient(_client);
|
||||||
await subscribeToEvents(_client);
|
await subscribeToEvents(_client);
|
||||||
await checkPersistedState(_client);
|
await checkPersistedState(_client);
|
||||||
|
Loading…
Reference in New Issue
Block a user