@redzone/taunt-logins-ui-react 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -5
- package/dist/es/index.js +2 -5
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -581,13 +581,10 @@ const TauntProvider = ({ children, tauntServiceEndpoint, magicKey })=>{
|
|
|
581
581
|
});
|
|
582
582
|
const [initialised, setInitialised] = react.useState(false);
|
|
583
583
|
const [tauntUser, setTauntUser] = react.useState();
|
|
584
|
-
const
|
|
584
|
+
const [loginDetails, setLoginDetails] = react.useState();
|
|
585
|
+
const taunt = react.useMemo(()=>new tauntLogins.TauntApi(tauntServiceEndpoint, setLoginDetails), [
|
|
585
586
|
tauntServiceEndpoint
|
|
586
587
|
]);
|
|
587
|
-
const [loginDetails, setLoginDetails] = react.useState(()=>taunt.accessToken ? {
|
|
588
|
-
accessToken: taunt.accessToken,
|
|
589
|
-
refreshToken: taunt.refreshToken ?? ""
|
|
590
|
-
} : undefined);
|
|
591
588
|
const [isLoading, setIsLoading] = react.useState(false);
|
|
592
589
|
const loggedIn = !!tauntUser;
|
|
593
590
|
const getMe = react.useCallback(async (force = false)=>{
|
package/dist/es/index.js
CHANGED
|
@@ -581,13 +581,10 @@ const TauntProvider = ({ children, tauntServiceEndpoint, magicKey })=>{
|
|
|
581
581
|
});
|
|
582
582
|
const [initialised, setInitialised] = useState(false);
|
|
583
583
|
const [tauntUser, setTauntUser] = useState();
|
|
584
|
-
const
|
|
584
|
+
const [loginDetails, setLoginDetails] = useState();
|
|
585
|
+
const taunt = useMemo(()=>new TauntApi(tauntServiceEndpoint, setLoginDetails), [
|
|
585
586
|
tauntServiceEndpoint
|
|
586
587
|
]);
|
|
587
|
-
const [loginDetails, setLoginDetails] = useState(()=>taunt.accessToken ? {
|
|
588
|
-
accessToken: taunt.accessToken,
|
|
589
|
-
refreshToken: taunt.refreshToken ?? ""
|
|
590
|
-
} : undefined);
|
|
591
588
|
const [isLoading, setIsLoading] = useState(false);
|
|
592
589
|
const loggedIn = !!tauntUser;
|
|
593
590
|
const getMe = useCallback(async (force = false)=>{
|