@plasmicapp/react-web 0.2.156 → 0.2.158

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/all.d.ts CHANGED
@@ -20,7 +20,7 @@ declare function classNames$1(...args: Argument[]): string;
20
20
  interface PlasmicPageGuardProps {
21
21
  appId: string;
22
22
  authorizeEndpoint: string;
23
- minRole: string;
23
+ minRole?: string;
24
24
  canTriggerLogin: boolean;
25
25
  children: React__default.ReactNode;
26
26
  }
@@ -2,7 +2,7 @@ import React from "react";
2
2
  interface PlasmicPageGuardProps {
3
3
  appId: string;
4
4
  authorizeEndpoint: string;
5
- minRole: string;
5
+ minRole?: string;
6
6
  canTriggerLogin: boolean;
7
7
  children: React.ReactNode;
8
8
  }
@@ -859,6 +859,9 @@ function PlasmicPageGuard(props) {
859
859
  }
860
860
  }, [dataSourceCtxValue, appId, authorizeEndpoint, canTriggerLogin]);
861
861
  function canUserViewPage() {
862
+ if (!minRole) {
863
+ return true;
864
+ }
862
865
  if (!dataSourceCtxValue) {
863
866
  return false;
864
867
  }