@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.
@@ -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 taunt = react.useMemo(()=>new tauntLogins.TauntApi(tauntServiceEndpoint), [
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 taunt = useMemo(()=>new TauntApi(tauntServiceEndpoint), [
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)=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redzone/taunt-logins-ui-react",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "main": "./dist/es/index.js",
6
6
  "module": "./dist/es/index.js",