@redzone/taunt-logins-ui-react 0.0.22 → 0.0.23

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.
@@ -580,11 +580,14 @@ const TauntProvider = ({ children, tauntServiceEndpoint, magicKey })=>{
580
580
  magicKey
581
581
  });
582
582
  const [initialised, setInitialised] = react.useState(false);
583
- const [loginDetails, setLoginDetails] = react.useState();
584
583
  const [tauntUser, setTauntUser] = react.useState();
585
584
  const taunt = react.useMemo(()=>new tauntLogins.TauntApi(tauntServiceEndpoint), [
586
585
  tauntServiceEndpoint
587
586
  ]);
587
+ const [loginDetails, setLoginDetails] = react.useState(()=>taunt.accessToken ? {
588
+ accessToken: taunt.accessToken,
589
+ refreshToken: taunt.refreshToken ?? ""
590
+ } : undefined);
588
591
  const [isLoading, setIsLoading] = react.useState(false);
589
592
  const loggedIn = !!tauntUser;
590
593
  const getMe = react.useCallback(async (force = false)=>{
package/dist/es/index.js CHANGED
@@ -580,11 +580,14 @@ const TauntProvider = ({ children, tauntServiceEndpoint, magicKey })=>{
580
580
  magicKey
581
581
  });
582
582
  const [initialised, setInitialised] = useState(false);
583
- const [loginDetails, setLoginDetails] = useState();
584
583
  const [tauntUser, setTauntUser] = useState();
585
584
  const taunt = useMemo(()=>new TauntApi(tauntServiceEndpoint), [
586
585
  tauntServiceEndpoint
587
586
  ]);
587
+ const [loginDetails, setLoginDetails] = useState(()=>taunt.accessToken ? {
588
+ accessToken: taunt.accessToken,
589
+ refreshToken: taunt.refreshToken ?? ""
590
+ } : undefined);
588
591
  const [isLoading, setIsLoading] = useState(false);
589
592
  const loggedIn = !!tauntUser;
590
593
  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.22",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "main": "./dist/es/index.js",
6
6
  "module": "./dist/es/index.js",
@@ -59,7 +59,6 @@
59
59
  "globals": "^16.4.0",
60
60
  "prettier": "latest",
61
61
  "prettier-config-custom": "*",
62
- "react": "latest",
63
62
  "typescript": "~5.9.3",
64
63
  "typescript-eslint": "^8.45.0",
65
64
  "vite": "^7.2.1"