From a2668c22f0d18386fc988f27299172145d9fa15d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 3 Jan 2023 01:57:39 -0300 Subject: refactor better QA removed axios, use fetch removed jest, added mocha and chai moved the default request handler to runtime dependency (so it can be replaced for testing) refactored ALL the test to the standard web-utils all hooks now use ONE request handler moved the tests from test folder to src --- packages/merchant-backoffice-ui/src/context/backend.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/merchant-backoffice-ui/src/context/backend.ts') diff --git a/packages/merchant-backoffice-ui/src/context/backend.ts b/packages/merchant-backoffice-ui/src/context/backend.ts index f8d1bc397..f7f8afea6 100644 --- a/packages/merchant-backoffice-ui/src/context/backend.ts +++ b/packages/merchant-backoffice-ui/src/context/backend.ts @@ -31,6 +31,7 @@ interface BackendContextType { clearAllTokens: () => void; addTokenCleaner: (c: () => void) => void; updateLoginStatus: (url: string, token?: string) => void; + updateToken: (token?: string) => void; } const BackendContext = createContext({ @@ -41,6 +42,7 @@ const BackendContext = createContext({ clearAllTokens: () => null, addTokenCleaner: () => null, updateLoginStatus: () => null, + updateToken: () => null, }); function useBackendContextState( @@ -87,6 +89,7 @@ function useBackendContextState( updateLoginStatus, resetBackend, clearAllTokens, + updateToken, addTokenCleaner: addTokenCleanerMemo, }; } -- cgit v1.2.3