@digitaldefiance/express-suite-react-components 2.3.0 → 2.3.1

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/README.md CHANGED
@@ -297,6 +297,10 @@ MIT © Digital Defiance
297
297
 
298
298
  ## ChangeLog
299
299
 
300
+ ### v2.3.1
301
+
302
+ - Add missing UnAuth component
303
+
300
304
  ### v2.3.0
301
305
 
302
306
  #### Breaking Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-react-components",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "React MUI components for Digital Defiance Express Suite",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface UnAuthProps {
3
+ children: ReactNode;
4
+ }
5
+ declare const UnAuth: FC<UnAuthProps>;
6
+ export default UnAuth;
7
+ //# sourceMappingURL=UnAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnAuth.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/auth/UnAuth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAGlD,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAQ3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const AuthProvider_1 = require("../contexts/AuthProvider");
6
+ const UnAuth = ({ children }) => {
7
+ const { isAuthenticated, isCheckingAuth } = (0, react_1.useContext)(AuthProvider_1.AuthContext);
8
+ if (isCheckingAuth || isAuthenticated) {
9
+ return null;
10
+ }
11
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
12
+ };
13
+ exports.default = UnAuth;