@bunnyapp/components 1.3.0-beta.1 → 1.3.0-beta.3

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/cjs/index.js CHANGED
@@ -154,7 +154,7 @@ var BrandContext = react.createContext({
154
154
  });
155
155
 
156
156
  // This will be replaced at build time by rollup-plugin-replace
157
- var PACKAGE_VERSION = '1.2.0';
157
+ var PACKAGE_VERSION = '1.3.0-beta.2';
158
158
  var createRequestHeaders = function (token) {
159
159
  var headers = common.createClientDevHeaders(token);
160
160
  // Add the components version header
@@ -20472,6 +20472,7 @@ var useCurrentUserData = function (token) {
20472
20472
  var currentUserData = reactQuery.useQuery({
20473
20473
  queryKey: common.QueryKeyFactory.default.currentUserKey(token),
20474
20474
  queryFn: function () { return getCurrentUserData({ token: token, apiHost: apiHost }); },
20475
+ enabled: Boolean(token),
20475
20476
  }).data;
20476
20477
  return currentUserData || {};
20477
20478
  };
@@ -20484,7 +20485,8 @@ var BunnyFooterIcon = function (_a) {
20484
20485
  var Text$g = antd.Typography.Text;
20485
20486
  var Footer = function (_a) {
20486
20487
  var className = _a.className;
20487
- var _b = useCurrentUserData(), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
20488
+ var token = useToken();
20489
+ var _b = useCurrentUserData(token), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
20488
20490
  var isMobile = common.useIsMobile();
20489
20491
  return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-shrink-0 ".concat(isMobile ? 'bunny-flex-col bunny-gap-2' : '', " ").concat(className) }, { children: [(termsUrl || privacyUrl) && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-3" }, { children: [termsUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: termsUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Terms" }))), privacyUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: privacyUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Privacy" })))] }))), jsxRuntime.jsx(BunnyMarketingLink, {})] })));
20490
20492
  };
@@ -1,5 +1,5 @@
1
1
  import { currentUser as CurrentUser } from '@bunnyapp/common';
2
- declare const useCurrentUserData: (token?: string) => {
2
+ declare const useCurrentUserData: (token: string | undefined) => {
3
3
  authObjectName: any;
4
4
  account: any;
5
5
  companyName: any;
package/dist/esm/index.js CHANGED
@@ -143,7 +143,7 @@ var BrandContext = createContext({
143
143
  });
144
144
 
145
145
  // This will be replaced at build time by rollup-plugin-replace
146
- var PACKAGE_VERSION = '1.2.0';
146
+ var PACKAGE_VERSION = '1.3.0-beta.2';
147
147
  var createRequestHeaders = function (token) {
148
148
  var headers = createClientDevHeaders(token);
149
149
  // Add the components version header
@@ -20461,6 +20461,7 @@ var useCurrentUserData = function (token) {
20461
20461
  var currentUserData = useQuery({
20462
20462
  queryKey: QueryKeyFactory.default.currentUserKey(token),
20463
20463
  queryFn: function () { return getCurrentUserData({ token: token, apiHost: apiHost }); },
20464
+ enabled: Boolean(token),
20464
20465
  }).data;
20465
20466
  return currentUserData || {};
20466
20467
  };
@@ -20473,7 +20474,8 @@ var BunnyFooterIcon = function (_a) {
20473
20474
  var Text$g = Typography.Text;
20474
20475
  var Footer = function (_a) {
20475
20476
  var className = _a.className;
20476
- var _b = useCurrentUserData(), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
20477
+ var token = useToken();
20478
+ var _b = useCurrentUserData(token), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
20477
20479
  var isMobile = useIsMobile();
20478
20480
  return (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-shrink-0 ".concat(isMobile ? 'bunny-flex-col bunny-gap-2' : '', " ").concat(className) }, { children: [(termsUrl || privacyUrl) && (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-3" }, { children: [termsUrl && (jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: termsUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Terms" }))), privacyUrl && (jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: privacyUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Privacy" })))] }))), jsx(BunnyMarketingLink, {})] })));
20479
20481
  };
@@ -1,5 +1,5 @@
1
1
  import { currentUser as CurrentUser } from '@bunnyapp/common';
2
- declare const useCurrentUserData: (token?: string) => {
2
+ declare const useCurrentUserData: (token: string | undefined) => {
3
3
  authObjectName: any;
4
4
  account: any;
5
5
  companyName: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.3.0-beta.1",
3
+ "version": "1.3.0-beta.3",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",