fix: adds missing setLoading toggle

This commit is contained in:
Ben Kremer 2022-02-09 13:53:56 +01:00
parent 1ca7a5cfd1
commit 22c0a7c456

View File

@ -213,11 +213,14 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
const createClient = useCallback(async () => {
try {
setLoading(true);
const _client = await Client.init({
logger: DEFAULT_LOGGER,
relayUrl: DEFAULT_RELAY_URL,
projectId: DEFAULT_PROJECT_ID,
});
setClient(_client);
await subscribeToEvents(_client);
await checkPersistedState(_client);