These are a couple of somewhat independent changes, but bundling them together in one PR avoids conflicts as they modify adjacent lines of code:
Translate OnlineStatusContext to TypeScript and move value type declaration into this module.
Get api from SessionContext instead of using useApi, like we now do with LocalStorageKeystore.
Remove useMemo from api/index.ts, as this is no longer needed since we have only one instance in the SessionContext. This simplifies the code by removing hook dependencies etc.
Remove useCallback uses from <WebauthnSignupLogin> since they don't noticeably affect performance and this simplifies the code by removing hook dependencies etc.
These are a couple of somewhat independent changes, but bundling them together in one PR avoids conflicts as they modify adjacent lines of code:
OnlineStatusContext
to TypeScript and move value type declaration into this module.api
fromSessionContext
instead of usinguseApi
, like we now do withLocalStorageKeystore
.useMemo
fromapi/index.ts
, as this is no longer needed since we have only one instance in theSessionContext
. This simplifies the code by removing hook dependencies etc.useCallback
uses from<WebauthnSignupLogin>
since they don't noticeably affect performance and this simplifies the code by removing hook dependencies etc.