@ludo.ninja/components 2.1.44 → 2.1.46

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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.GlobalLayout = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const envLine_1 = __importDefault(require("@ludo.ninja/ui/build/components/envLine"));
9
- // import { SidebarInitializer } from '@/components/sidebar/initializer';
9
+ const initializer_1 = require("../components/sidebar/initializer");
10
10
  const useAuthVerification_1 = require("../modules/user/auth/useAuthVerification");
11
11
  const profileDataInitialization_1 = require("../modules/user/profileData/profileDataInitialization");
12
12
  const env_1 = require("../store/env");
@@ -28,6 +28,6 @@ const GlobalLayout = ({ children }) => {
28
28
  (0, useAuthVerification_1.useAuthVerification)();
29
29
  const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
30
30
  const envValue = NEXT_PUBLIC_ENV_VALUE !== 'prod' ? NEXT_PUBLIC_ENV_VALUE : '';
31
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(profileDataInitialization_1.ProfileDataInitialization, {}), (0, jsx_runtime_1.jsx)(envLine_1.default, { isNeedToShow: envValue }), (0, jsx_runtime_1.jsx)(globalStyles_1.default, {}), children, (0, jsx_runtime_1.jsx)(CreatorNotifications_1.CreatorNotifications, {}), (0, jsx_runtime_1.jsx)(screen_1.InitializeAppHeight, {}), (0, jsx_runtime_1.jsx)(SubscriberNotifications_1.SubscriberNotification, {}), (0, jsx_runtime_1.jsx)(Overlay_1.default, {}), (0, jsx_runtime_1.jsx)(Alert_1.default, {}), (0, jsx_runtime_1.jsx)(Modal_1.default, {}), (0, jsx_runtime_1.jsx)(ModalSidebar_1.default, {}), (0, jsx_runtime_1.jsx)(CreatorModalSidebarPortal_1.CreatorModalSidebarPortal, {}), (0, jsx_runtime_1.jsx)(sessionScroll_1.DeleteScrollStateInterceptor, {})] }));
31
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(profileDataInitialization_1.ProfileDataInitialization, {}), (0, jsx_runtime_1.jsx)(envLine_1.default, { isNeedToShow: envValue }), (0, jsx_runtime_1.jsx)(globalStyles_1.default, {}), children, (0, jsx_runtime_1.jsx)(CreatorNotifications_1.CreatorNotifications, {}), (0, jsx_runtime_1.jsx)(screen_1.InitializeAppHeight, {}), (0, jsx_runtime_1.jsx)(SubscriberNotifications_1.SubscriberNotification, {}), (0, jsx_runtime_1.jsx)(Overlay_1.default, {}), (0, jsx_runtime_1.jsx)(initializer_1.SidebarInitializer, {}), (0, jsx_runtime_1.jsx)(Alert_1.default, {}), (0, jsx_runtime_1.jsx)(Modal_1.default, {}), (0, jsx_runtime_1.jsx)(ModalSidebar_1.default, {}), (0, jsx_runtime_1.jsx)(CreatorModalSidebarPortal_1.CreatorModalSidebarPortal, {}), (0, jsx_runtime_1.jsx)(sessionScroll_1.DeleteScrollStateInterceptor, {})] }));
32
32
  };
33
33
  exports.GlobalLayout = GlobalLayout;
@@ -16,7 +16,7 @@ const ScreenWidth_1 = require("../../../styles/ScreenWidth");
16
16
  const boxTransform_1 = __importDefault(require("../../../styles/mixins/boxTransform"));
17
17
  const ImageInterceptor_1 = require("../ImageInterceptor");
18
18
  const useFetchUserPic_1 = __importDefault(require("../../../api/server-medias/queries/useFetchUserPic"));
19
- const defaultUserpic_svg_1 = __importDefault(require("../../../public/defaultUserpics/defaultUserpic"));
19
+ // import DefaultUserPicIcon from "@/public/defaultUserpics/defaultUserpic.svg";
20
20
  const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
21
21
  // Styles
22
22
  const StyledHeaderUserPic = styled_components_1.default.div `
@@ -66,10 +66,13 @@ const UserPic = ({ userId, width, height, isNeedBoxTransform, children, }) => {
66
66
  }
67
67
  }, [userId, isSignedIn, isLoadingProfileData, profileData]);
68
68
  const renderDefaultUserPic = () => {
69
- return (0, jsx_runtime_1.jsx)(defaultUserpic_svg_1.default, { className: "userPicImage" });
69
+ // return <DefaultUserPicIcon className={"userPicImage"} />;
70
+ return (0, jsx_runtime_1.jsxs)("svg", { className: "userPicImage", viewBox: "0 0 120 120", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("g", { clipPath: "url(#clip0_1631_36821)", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_1631_36821", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "120", height: "120", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 57.5C0 18.5 18.5 0 57.5 0H62.5C101.5 0 120 18.5 120 57.5V62.5C120 101.5 101.5 120 62.5 120H57.5C18.5 120 0 101.5 0 62.5V57.5Z", fill: "#C4C4C4" }) }), (0, jsx_runtime_1.jsxs)("g", { mask: "url(#mask0_1631_36821)", children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 60C0 10.59 10.59 0 60 0C109.41 0 120 10.59 120 60C120 109.41 109.41 120 60 120C10.59 120 0 109.41 0 60Z", fill: "#6048FF" }), (0, jsx_runtime_1.jsx)("g", { filter: "url(#filter0_f_1631_36821)", children: (0, jsx_runtime_1.jsx)("path", { d: "M122.923 22.164L117.289 24.1018C117.289 24.1018 70.1542 14.04 40.7826 25.6887C11.411 37.3374 -13.0768 73.5812 -13.0768 73.5812L-18.7103 75.519L-19.1418 61.7571L-3.51315 25.4694L19.3845 -0.953981L59.6143 -19.4288L101.911 -12.3395L122.923 22.164Z", fill: "#BB6BD9" }) }), (0, jsx_runtime_1.jsx)("g", { filter: "url(#filter1_f_1631_36821)", children: (0, jsx_runtime_1.jsx)("path", { d: "M-24.8609 52.797L-18.6129 53.7922C-18.6129 53.7922 -0.143277 -5.59894 21.8596 38.1435C43.8624 81.8859 103.432 73.9375 103.432 73.9375L133.707 73.2504L129.729 87.0304L102.492 114.722L71.155 128.949L25.0516 126.409L-14.9265 97.6202L-24.8609 52.797Z", fill: "#4FD4F8", fillOpacity: "0.7" }) })] })] }), (0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("filter", { id: "filter0_f_1631_36821", x: "-29.1416", y: "-29.4287", width: "162.064", height: "114.948", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "5", result: "effect1_foregroundBlur_1631_36821" })] }), (0, jsx_runtime_1.jsxs)("filter", { id: "filter1_f_1631_36821", x: "-34.8613", y: "12.0684", width: "178.568", height: "126.88", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "5", result: "effect1_foregroundBlur_1631_36821" })] }), (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_1631_36821", children: (0, jsx_runtime_1.jsx)("rect", { width: "120", height: "120", rx: "60", fill: "white" }) })] })] });
70
71
  };
71
72
  const renderImage = () => {
72
- return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: "50%", children: (0, jsx_runtime_1.jsx)(image_1.default, { src: (profileUserPic || userPic), className: "userPicImage", width: width, height: height, priority: true, alt: "ludo ninja userPick" }) }));
73
+ return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: "50%", children: (0, jsx_runtime_1.jsx)(image_1.default, { src: (profileUserPic || userPic), className: "userPicImage", width: width, height: height,
74
+ // priority={true}
75
+ alt: "ludo ninja userPick" }) }));
73
76
  };
74
77
  const renderImageOrDefaultUserPic = () => {
75
78
  return profileUserPic || userPic ? renderImage() : renderDefaultUserPic();
@@ -5,6 +5,6 @@ const env_1 = require("../../store/env");
5
5
  const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
6
6
  const useRedirectToLoginWindow = () => {
7
7
  const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
8
- return () => window.open(`${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]}/login/?fallback_url=${window.location.href.replace(/\s/g, "")}`, "_self");
8
+ return () => window.open(`${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["auth"]}/login/?fallback_url=${window.location.href.replace(/\s/g, "")}`, "_self");
9
9
  };
10
10
  exports.useRedirectToLoginWindow = useRedirectToLoginWindow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.1.44",
3
+ "version": "2.1.46",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",