@privy-io/react-auth 1.3.0-beta.4 → 1.3.0-beta.5

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/index.d.ts CHANGED
@@ -342,6 +342,7 @@ interface PrivyProviderProps {
342
342
  * onSuccess is run when an auth (`login`) or linking (`linkEmail` or `linkWallet`)
343
343
  * action is completed successfully.
344
344
  */
345
+ showSocials?: boolean;
345
346
  onSuccess?: (user: User) => void;
346
347
  children: React.ReactNode;
347
348
  }
package/dist/index.js CHANGED
@@ -1043,7 +1043,8 @@ var ModalContext = (0, import_react3.createContext)({
1043
1043
  currentScreen: "LANDING" /* LANDING */,
1044
1044
  lastScreen: "LANDING" /* LANDING */,
1045
1045
  navigate: notImplemented,
1046
- navigateBack: notImplemented
1046
+ navigateBack: notImplemented,
1047
+ showSocials: false
1047
1048
  });
1048
1049
  var ModalProvider = (props) => {
1049
1050
  const client = props.client;
@@ -1083,7 +1084,8 @@ var ModalProvider = (props) => {
1083
1084
  },
1084
1085
  navigateBack: () => {
1085
1086
  setCurrentScreen(lastScreen);
1086
- }
1087
+ },
1088
+ showSocials: props.showSocials || false
1087
1089
  };
1088
1090
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(ModalContext.Provider, {
1089
1091
  value: ctx,
@@ -2028,7 +2030,7 @@ var import_jsx_runtime20 = require("react/jsx-runtime");
2028
2030
  var LandingScreen = () => {
2029
2031
  const [activeSection, setActiveSection] = (0, import_react5.useState)(0 /* WALLET */);
2030
2032
  const { ready, authenticated, user } = usePrivy();
2031
- const { navigate } = usePrivyModal();
2033
+ const { navigate, showSocials } = usePrivyModal();
2032
2034
  (0, import_react5.useEffect)(() => {
2033
2035
  var _a, _b, _c, _d, _e;
2034
2036
  const atLeastOneSocial = (user == null ? void 0 : user.google) || (user == null ? void 0 : user.twitter) || (user == null ? void 0 : user.discord);
@@ -2101,7 +2103,7 @@ var LandingScreen = () => {
2101
2103
  emailSectionActive ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ConnectEmailForm, {}) : null
2102
2104
  ]
2103
2105
  }),
2104
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(ConnectSection, {
2106
+ showSocials && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(ConnectSection, {
2105
2107
  active: socialSectionActive,
2106
2108
  onClick: () => {
2107
2109
  if (!socialSectionActive)
@@ -6629,6 +6631,7 @@ var PrivatePrivyProvider = (props) => {
6629
6631
  value: internalContext,
6630
6632
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ModalProvider, {
6631
6633
  client,
6634
+ showSocials: props.showSocials || false,
6632
6635
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoginModal, {})
6633
6636
  })
6634
6637
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/react-auth",
3
- "version": "1.3.0-beta.4",
3
+ "version": "1.3.0-beta.5",
4
4
  "description": "React client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",