@ludo.ninja/components 2.0.18 → 2.1.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.
Files changed (27) hide show
  1. package/build/api/server-experiences/queries/useFetchMyExperienceWithLevel/index.js +11 -2
  2. package/build/api/subscriptions/SubscriberInviteNotification.js +10 -1
  3. package/build/components/assetPage/category/index.js +4 -1
  4. package/build/components/assetPage/information/index.js +3 -1
  5. package/build/components/assetPage/participants/index.js +3 -1
  6. package/build/components/assetPage/tittle/index.js +3 -1
  7. package/build/components/headers/components/headerExperienceLabel/index.js +4 -1
  8. package/build/components/headers/header/index.js +4 -1
  9. package/build/components/headers/headerSearch/index.js +3 -1
  10. package/build/components/headers/headerSimple/index.js +4 -1
  11. package/build/components/search/SearchInputContainer.d.ts +1 -1
  12. package/build/components/search/SearchInputContainer.js +16 -14
  13. package/build/components/search/searchSuggestions/index.js +7 -4
  14. package/build/components/sidebar/data.d.ts +1 -14
  15. package/build/components/sidebar/data.js +66 -52
  16. package/build/components/sidebar/index.js +13 -40
  17. package/build/components/sidebar/sidebarInviteCodeLabel/index.js +4 -1
  18. package/build/modules/opportunity/OpportunityCard.js +6 -0
  19. package/build/modules/user/auth/useSignOut.js +4 -3
  20. package/build/store/env/index.d.ts +0 -4
  21. package/build/store/env/index.js +0 -4
  22. package/build/system/Cards/CreationCard/index.d.ts +2 -2
  23. package/build/system/Cards/CreationCard/index.js +32 -17
  24. package/build/system/Cards/MultiMediaCard/index.js +4 -1
  25. package/build/system/Img/Userpic/index.js +3 -1
  26. package/build/utils/auth/index.js +3 -2
  27. package/package.json +1 -1
@@ -8,7 +8,10 @@ const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
8
8
  const store_1 = require("../../../../modules/user/store");
9
9
  const ui_1 = require("../../../../store/ui");
10
10
  const notifications_1 = require("../../../../modules/notifications");
11
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
12
+ const env_1 = require("../../../../store/env");
11
13
  const useFetchMyExperienceWithLevel = () => {
14
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)(state => state.NEXT_PUBLIC_ENV_VALUE);
12
15
  const { user, isSignedIn, setUserExp, resetUserExp, setErrorExp, setIsLoadingExp, } = (0, store_1.useUserStore)((state) => ({
13
16
  user: state.user,
14
17
  isSignedIn: state.isSignedIn,
@@ -22,7 +25,7 @@ const useFetchMyExperienceWithLevel = () => {
22
25
  addNotification: state.addNotification,
23
26
  }));
24
27
  const router = (0, router_1.useRouter)();
25
- const userId = user?.userId || '';
28
+ const userId = user?.userId || "";
26
29
  const [fetchExp, { subscribeToMore }] = (0, client_1.useLazyQuery)(api_1.experiencesSchema.FetchMyExperienceV2Document, {
27
30
  context: {
28
31
  uri: api_1.hosts.experiencesHost,
@@ -61,7 +64,13 @@ const useFetchMyExperienceWithLevel = () => {
61
64
  xpsIncrement,
62
65
  ...(description ? { description } : {}),
63
66
  onClick: () => {
64
- router.push(`/rewards/${userId}`);
67
+ const domain = ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"];
68
+ if (domain === window.origin) {
69
+ router.push(`/rewards/${userId}`);
70
+ }
71
+ else {
72
+ window.open(`${domain}/rewards/${userId}`);
73
+ }
65
74
  },
66
75
  }));
67
76
  }
@@ -9,7 +9,10 @@ const api_1 = require("@ludo.ninja/api");
9
9
  const store_1 = require("../../modules/user/store");
10
10
  const ui_1 = require("../../store/ui");
11
11
  const notifications_1 = require("../../modules/notifications");
12
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
13
+ const env_1 = require("../../store/env");
12
14
  const Subscription = () => {
15
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)(state => state.NEXT_PUBLIC_ENV_VALUE);
13
16
  const { authToken } = api_1.authCookies.getCookies();
14
17
  const router = (0, router_1.useRouter)();
15
18
  const addNotification = (0, ui_1.useUiStore)((state) => state.addNotification);
@@ -25,7 +28,13 @@ const Subscription = () => {
25
28
  addNotification((0, notifications_1.createInviteNotification)({
26
29
  inviteCode,
27
30
  onClick: () => {
28
- router.push(`/invite-codes`);
31
+ const domain = ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"];
32
+ if (domain === window.origin) {
33
+ router.push(`/invite-codes`);
34
+ }
35
+ else {
36
+ window.open(`${domain}/invite-codes`);
37
+ }
29
38
  },
30
39
  }));
31
40
  }
@@ -11,6 +11,8 @@ const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
11
11
  const ScreenWidth_1 = require("../../../styles/ScreenWidth");
12
12
  const index_1 = require("../../../system/index");
13
13
  const vars_1 = require("../../../fonts/vars");
14
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
15
+ const env_1 = require("../../../store/env");
14
16
  // Styles
15
17
  const StyledBox = (0, styled_components_1.default)(index_1.Box) `
16
18
  text-align: center;
@@ -50,6 +52,7 @@ const Category = ({ asset }) => {
50
52
  //update
51
53
  const category = asset.getCategory() ?? 'all';
52
54
  const categoryLabel = asset.getCategoryLabel() ?? 'All';
53
- return ((0, jsx_runtime_1.jsx)(link_1.default, { style: { display: 'block', width: 'max-content' }, href: `/search/nfts?category=${category}`, children: (0, jsx_runtime_1.jsx)(StyledBox, { children: (0, jsx_runtime_1.jsx)(StyledText, { children: categoryLabel }) }) }));
55
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
56
+ return ((0, jsx_runtime_1.jsx)(link_1.default, { style: { display: 'block', width: 'max-content' }, href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["search"]}/nfts?category=${category}`, children: (0, jsx_runtime_1.jsx)(StyledBox, { children: (0, jsx_runtime_1.jsx)(StyledText, { children: categoryLabel }) }) }));
54
57
  };
55
58
  exports.Category = Category;
@@ -18,6 +18,7 @@ const index_1 = require("../../../system/index");
18
18
  const copyBtn_1 = require("../../../utils/copyBtn");
19
19
  const screen_1 = require("../../../utils/screen");
20
20
  const vars_1 = require("../../../fonts/vars");
21
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
21
22
  const StyledImage = styled_components_1.default.img `
22
23
  border-radius: 50%;
23
24
  width: 16px;
@@ -97,6 +98,7 @@ const SFlex = (0, styled_components_1.default)(index_1.Flex) `
97
98
  }
98
99
  `;
99
100
  const Information = ({ asset }) => {
101
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
100
102
  const tokenId = asset.getTokenId();
101
103
  const splittedAssetId = asset.getSplitedAssetId();
102
104
  const address = asset.getAddress();
@@ -110,7 +112,7 @@ const Information = ({ asset }) => {
110
112
  ? { overflow: 'hidden' }
111
113
  : undefined;
112
114
  const getStaticENVDomain = (0, env_1.useEnvStore)((state) => state.getStaticDomain);
113
- return ((0, jsx_runtime_1.jsxs)(index_1.Flex, { flexDirection: "column", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(SFlex, { justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.TextGrayColor, children: "Blockchain" }), (0, jsx_runtime_1.jsx)(link_1.default, { href: `/search/nfts?blockchain=${blockChain.getBlockChainPrivateLabel()}`, children: (0, jsx_runtime_1.jsxs)(SBlockchain, { children: [(0, jsx_runtime_1.jsx)("p", { children: blockChain.getBlockChainPublicLabel() }), (0, jsx_runtime_1.jsx)(StyledImage, { width: 16, height: 16, src: blockChain.getBlockChainIconRegular({
115
+ return ((0, jsx_runtime_1.jsxs)(index_1.Flex, { flexDirection: "column", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(SFlex, { justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.TextGrayColor, children: "Blockchain" }), (0, jsx_runtime_1.jsx)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["search"]}/nfts?blockchain=${blockChain.getBlockChainPrivateLabel()}`, children: (0, jsx_runtime_1.jsxs)(SBlockchain, { children: [(0, jsx_runtime_1.jsx)("p", { children: blockChain.getBlockChainPublicLabel() }), (0, jsx_runtime_1.jsx)(StyledImage, { width: 16, height: 16, src: blockChain.getBlockChainIconRegular({
114
116
  domain: getStaticENVDomain(),
115
117
  }), alt: blockChain.getBlockChainPublicLabel() })] }) })] }), address && ((0, jsx_runtime_1.jsxs)(FlexOverflow, { children: [(0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.TextGrayColor, children: "Contract Address" }), (0, jsx_runtime_1.jsx)(copyBtn_1.CopyButton, { value: address, style: styleOverflow, children: isDesktop ? ((0, jsx_runtime_1.jsx)(OverflowH5, { color: colors_2.AccentColor, title: address, children: address })) : ((0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.AccentColor, title: address, children: (0, utils_1.shortenedText)(address) })) })] })), (0, jsx_runtime_1.jsxs)(FlexOverflow, { children: [(0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.TextGrayColor, children: idTittle }), (0, jsx_runtime_1.jsx)(copyBtn_1.CopyButton, { value: id, style: styleOverflow, children: isDesktop ? ((0, jsx_runtime_1.jsx)(OverflowH5, { color: colors_2.AccentColor, title: id, children: id })) : ((0, jsx_runtime_1.jsx)(BoxOverflow, { children: (0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.AccentColor, title: id, children: (0, jsx_runtime_1.jsx)(BoxOverflow, { children: id }) }) })) })] }), blockTimestamp && ((0, jsx_runtime_1.jsxs)(SFlex, { justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.TextGrayColor, children: "Added on" }), (0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_2.TextGrayColor, children: (0, moment_1.default)(blockTimestamp * 1000).format('LL') })] }))] }));
116
118
  };
@@ -18,6 +18,7 @@ const scale_1 = require("../../../utils/adaptive/scale");
18
18
  const copyBtn_1 = require("../../../utils/copyBtn");
19
19
  const screen_1 = require("../../../utils/screen");
20
20
  const details_svg_1 = __importDefault(require("../../../public/assetPage/details"));
21
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
21
22
  const MultiFlexRight = (0, styled_components_1.default)(index_1.Flex) `
22
23
  margin-left: 100px;
23
24
  align-items: center;
@@ -119,6 +120,7 @@ const SSingleUserFlex = (0, styled_components_1.default)(index_1.Flex) `
119
120
  }
120
121
  `;
121
122
  const SingleUser = (props) => {
123
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
122
124
  const getMediaDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
123
125
  if (!props.profile && !props.address)
124
126
  return null;
@@ -126,7 +128,7 @@ const SingleUser = (props) => {
126
128
  return userName ? ((0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_1.BlackColor, children: userName })) : ((0, jsx_runtime_1.jsx)(copyBtn_1.CopyButton, { value: props.address, children: (0, jsx_runtime_1.jsx)(index_1.H5, { color: colors_1.BlackColor, children: (0, utils_1.shortenedText)(props.address) }) }));
127
129
  };
128
130
  const ludoUserMurkUp = (name) => {
129
- return name ? ((0, jsx_runtime_1.jsx)(SSingleUserLink, { href: `/profile/${props.profile?.userId}/nfts`, children: name })) : (isLudoWallet(props.profile?.username));
131
+ return name ? ((0, jsx_runtime_1.jsx)(SSingleUserLink, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${props.profile?.userId}/nfts`, children: name })) : (isLudoWallet(props.profile?.username));
130
132
  };
131
133
  return ((0, jsx_runtime_1.jsxs)(SSingleUser, { width: '50%', alignItems: "center", children: [Boolean(props?.profile && props?.profile?.userpic) && ((0, jsx_runtime_1.jsx)(index_1.ProfilePic, { size: 40, userPicSrc: (0, Urls_1.getUserPicImage)(getMediaDomain, props?.profile?.userpic, '/defaultUserpics/defaultUserpic.svg') })), Boolean(props?.profile && props?.profile?.userpic) || ((0, jsx_runtime_1.jsx)(index_1.ProfilePic, { size: 40, userPicSrc: '/defaultUserpics/defaultUserpic.svg' })), (0, jsx_runtime_1.jsxs)(SSingleUserFlex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(index_1.H6, { color: colors_1.TextGrayColor, children: props.title }), ludoUserMurkUp(props?.profile && props.profile.username)] })] }));
132
134
  };
@@ -15,6 +15,7 @@ const ScreenWidth_1 = require("../../../styles/ScreenWidth");
15
15
  const colors_1 = require("../../../styles/colors");
16
16
  const index_1 = require("../../../system/index");
17
17
  const ImageInterceptor_1 = require("../../../system/Img/ImageInterceptor");
18
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
18
19
  const SCollection = (0, styled_components_1.default)(index_1.Flex) `
19
20
  margin-bottom: 8px;
20
21
 
@@ -67,9 +68,10 @@ const SH1 = (0, styled_components_1.default)(index_1.H1) `
67
68
  `;
68
69
  const Collection = (props) => {
69
70
  const NEXT_PUBLIC_STATIC_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_STATIC_DOMAIN);
71
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
70
72
  if (!props.collectionTitle || !props.collectionId)
71
73
  return null;
72
- return ((0, jsx_runtime_1.jsxs)(SCollection, { alignItems: "center", children: [!!props.collectionMedias && ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { children: (0, jsx_runtime_1.jsx)(index_1.ExternalImage, { src: (0, Urls_1.getAssetImage)(props.collectionMedias[0]?.url, '/noContent/noContent.svg', Urls_1.mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN), alt: "collection_img", width: 28, height: 28, borderRadius: 2 }) })), (0, jsx_runtime_1.jsx)(link_1.default, { href: `/collection/${props?.collectionId}`, children: props.collectionTitle })] }));
74
+ return ((0, jsx_runtime_1.jsxs)(SCollection, { alignItems: "center", children: [!!props.collectionMedias && ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { children: (0, jsx_runtime_1.jsx)(index_1.ExternalImage, { src: (0, Urls_1.getAssetImage)(props.collectionMedias[0]?.url, '/noContent/noContent.svg', Urls_1.mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN), alt: "collection_img", width: 28, height: 28, borderRadius: 2 }) })), (0, jsx_runtime_1.jsx)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/collection/${props?.collectionId}`, children: props.collectionTitle })] }));
73
75
  };
74
76
  const Title = ({ name, collectionTitle, collectionMedias, collectionId, }) => {
75
77
  const [cuttedString, setCuttedString] = (0, react_1.useState)(name);
@@ -9,6 +9,8 @@ const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
9
9
  const store_1 = require("../../../../modules/user/store");
10
10
  const ScreenWidth_1 = require("../../../../styles/ScreenWidth");
11
11
  const ExperienceLabel_1 = __importDefault(require("../../../../system/Labels/ExperienceLabel"));
12
+ const env_1 = require("../../../../store/env");
13
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
12
14
  // Styles
13
15
  const StyledHeaderExperienceLabel = styled_components_1.default.div `
14
16
  margin-right: 20px;
@@ -18,6 +20,7 @@ const StyledHeaderExperienceLabel = styled_components_1.default.div `
18
20
  `;
19
21
  // Component
20
22
  const HeaderExperienceLabel = ({ userId }) => {
23
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
21
24
  const { userExp, isLoadingExp, errorExp } = (0, store_1.useUserStore)((state) => ({
22
25
  userExp: state.userExp,
23
26
  isLoadingExp: state.isLoadingExp,
@@ -25,7 +28,7 @@ const HeaderExperienceLabel = ({ userId }) => {
25
28
  }));
26
29
  if (!userId)
27
30
  return null;
28
- return ((0, jsx_runtime_1.jsx)(StyledHeaderExperienceLabel, { children: (0, jsx_runtime_1.jsx)(ExperienceLabel_1.default, { value: userExp.xps, link: `/rewards/${userId}`, loading: isLoadingExp || !!errorExp }) }));
31
+ return ((0, jsx_runtime_1.jsx)(StyledHeaderExperienceLabel, { children: (0, jsx_runtime_1.jsx)(ExperienceLabel_1.default, { value: userExp.xps, link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/rewards/${userId}`, loading: isLoadingExp || !!errorExp }) }));
29
32
  };
30
33
  // Export
31
34
  exports.default = HeaderExperienceLabel;
@@ -11,10 +11,13 @@ const headerUserPic_1 = __importDefault(require("../components/headerUserPic"));
11
11
  const store_1 = require("../../../modules/user/store");
12
12
  const ui_1 = require("../../../store/ui");
13
13
  const auth_1 = require("../../../utils/auth");
14
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
15
+ const env_1 = require("../../../store/env");
14
16
  // Component
15
17
  const Header = () => {
16
18
  const isSignedIn = (0, store_1.useUserStore)((state) => state.isSignedIn);
17
19
  const getUser = (0, store_1.useUserStore)((state) => state.user);
20
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
18
21
  const openSidebar = (0, ui_1.useUiStore)((state) => state.openSidebar);
19
22
  const redirectToLoginWindow = (0, auth_1.useRedirectToLoginWindow)();
20
23
  return ((0, jsx_runtime_1.jsx)(header_1.Header, { isAuthorized: isSignedIn, handle: {
@@ -23,7 +26,7 @@ const Header = () => {
23
26
  }, slots: {
24
27
  headerExpLabel: ((0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId || '' })),
25
28
  headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId || '' }),
26
- logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: '/', children: children }),
29
+ logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"], children: children }),
27
30
  } }));
28
31
  };
29
32
  // Export
@@ -13,6 +13,7 @@ const store_1 = require("../../../modules/user/store");
13
13
  const env_1 = require("../../../store/env");
14
14
  const ui_1 = require("../../../store/ui");
15
15
  const auth_1 = require("../../../utils/auth");
16
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
16
17
  // Component
17
18
  const HeaderSearch = () => {
18
19
  const openSidebar = (0, ui_1.useUiStore)((state) => state.openSidebar);
@@ -20,13 +21,14 @@ const HeaderSearch = () => {
20
21
  const getUser = (0, store_1.useUserStore)((state) => state.user);
21
22
  const redirectToLoginWindow = (0, auth_1.useRedirectToLoginWindow)();
22
23
  const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
24
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
23
25
  return ((0, jsx_runtime_1.jsx)(header_1.Header, { isAuthorized: isSignedIn, handle: {
24
26
  login: redirectToLoginWindow,
25
27
  openSidebar,
26
28
  }, slots: {
27
29
  headerExpLabel: ((0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId || '' })),
28
30
  headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId || '' }),
29
- logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: '/', children: children }),
31
+ logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"], children: children }),
30
32
  searchInput: ({ setInputFocused }) => {
31
33
  // Todo seacrh pages, hide search input from header
32
34
  return isProd() ? undefined : ((0, jsx_runtime_1.jsx)(searchSimpleInput_1.default, { onFocusHandler: setInputFocused }));
@@ -10,6 +10,8 @@ const colors_1 = require("../../../styles/colors");
10
10
  const screen_1 = require("../../../utils/screen");
11
11
  const styled_components_1 = __importDefault(require("styled-components"));
12
12
  const utils_1 = require("@ludo.ninja/utils");
13
+ const env_1 = require("../../../store/env");
14
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
13
15
  // Styles
14
16
  const StyledHeaderSimple = styled_components_1.default.header `
15
17
  display: flex;
@@ -70,7 +72,8 @@ const HeaderSimple = () => {
70
72
  return ((0, jsx_runtime_1.jsx)(image_1.default, { width: isMobile ? 31 : 116, height: isMobile ? 32 : 28, priority: true, src: isMobile ? '/logo/mobile_logo.svg' : '/logo/main_logo.svg', alt: "Ludo - a right place for NFT art" }));
71
73
  };
72
74
  const scrollDirection = (0, utils_1.useScrollDirection)();
73
- return ((0, jsx_runtime_1.jsx)(StyledHeaderSimple, { className: scrollDirection, children: (0, jsx_runtime_1.jsx)("div", { className: 'logo', children: (0, jsx_runtime_1.jsx)(link_1.default, { href: '/', children: renderDesktopLogoOrMobile() }) }) }));
75
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
76
+ return ((0, jsx_runtime_1.jsx)(StyledHeaderSimple, { className: scrollDirection, children: (0, jsx_runtime_1.jsx)("div", { className: 'logo', children: (0, jsx_runtime_1.jsx)(link_1.default, { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"], children: renderDesktopLogoOrMobile() }) }) }));
74
77
  };
75
78
  // Export
76
79
  exports.default = HeaderSimple;
@@ -1,4 +1,4 @@
1
- import React, { KeyboardEvent, MutableRefObject, ReactNode } from 'react';
1
+ import React, { KeyboardEvent, MutableRefObject, ReactNode } from "react";
2
2
  interface IUseSearch {
3
3
  onFocusHandler?: (arg: boolean) => void;
4
4
  isClearOnBlur?: boolean;
@@ -44,13 +44,14 @@ const ScreenWidth_1 = require("../../styles/ScreenWidth");
44
44
  const screen_1 = require("../../utils/screen");
45
45
  const seacrhTabs_1 = require("../../utils/seacrhTabs");
46
46
  const back_svg_1 = __importDefault(require("../../public/search/back"));
47
- const enterKey = 'Enter';
47
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
48
+ const enterKey = "Enter";
48
49
  const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputComponent, }) => {
49
- const NEXT_PUBLIC_ENV_SEARCH_DOMAIN = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_SEARCH_DOMAIN);
50
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
50
51
  const inputSearch = (0, react_1.useRef)(null);
51
- const [searchValue, setSearchValue] = (0, react_1.useState)('');
52
+ const [searchValue, setSearchValue] = (0, react_1.useState)("");
52
53
  //fix cache apollo with debounce
53
- const [debouncedValue, setDebouncedValue] = (0, react_1.useState)('');
54
+ const [debouncedValue, setDebouncedValue] = (0, react_1.useState)("");
54
55
  const [isDebounceLoading, setIsDebounceLoading] = (0, react_1.useState)(false);
55
56
  const [isSearchFocused, setSearchFocused] = (0, react_1.useState)(false);
56
57
  const { openOverLay, closeOverlay } = (0, ui_1.useUiStore)((state) => ({
@@ -90,14 +91,14 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
90
91
  setIsMobileOpen(false);
91
92
  (0, utils_1.rootRemoveOverflow)();
92
93
  if (isClearOnBlur) {
93
- setSearchValue('');
94
+ setSearchValue("");
94
95
  clearTopEntitiesState();
95
96
  }
96
97
  } })), initializeInputComponent({
97
98
  isMobileOpen,
98
99
  mobileOrDesktopPlaceHolder: isMobile
99
- ? 'Search'
100
- : 'Search for NFTs, collections, profiles, ENS and blockchain addresses',
100
+ ? "Search"
101
+ : "Search for NFTs, collections, profiles, ENS and blockchain addresses",
101
102
  isSearchFocused,
102
103
  searchValue,
103
104
  inputRef: inputSearch,
@@ -132,7 +133,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
132
133
  onFocusHandler?.(false);
133
134
  closeOverlay();
134
135
  if (isClearOnBlur) {
135
- setSearchValue('');
136
+ setSearchValue("");
136
137
  clearTopEntitiesState();
137
138
  }
138
139
  }, 100);
@@ -140,8 +141,9 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
140
141
  async keyPress(e) {
141
142
  if (e.key === enterKey) {
142
143
  const { value } = e.target;
143
- const newSearchValue = value.length ? searchValue : '';
144
- if (NEXT_PUBLIC_ENV_SEARCH_DOMAIN?.includes('search.') &&
144
+ const newSearchValue = value.length ? searchValue : "";
145
+ const searchDomain = ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["search"];
146
+ if (searchDomain === window.origin &&
145
147
  seacrhTabs_1.searchTabs.find((el) => router.pathname.includes(el.link))) {
146
148
  await router.replace({
147
149
  query: { ...router.query, term: newSearchValue },
@@ -151,7 +153,7 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
151
153
  closeOverlay();
152
154
  }
153
155
  else {
154
- window.open(`${NEXT_PUBLIC_ENV_SEARCH_DOMAIN}/${seacrhTabs_1.searchTabs[0].link}${newSearchValue ? `?term=${newSearchValue}` : ''}`, '_self');
156
+ window.open(`${searchDomain}/${seacrhTabs_1.searchTabs[0].link}${newSearchValue ? `?term=${newSearchValue}` : ""}`, "_self");
155
157
  // await router.push({
156
158
  // pathname: searchTabs[0].link,
157
159
  // query: { term: newSearchValue },
@@ -165,9 +167,9 @@ const SearchInputContainer = ({ onFocusHandler, isClearOnBlur, initializeInputCo
165
167
  },
166
168
  searchSuggestion: !isMobile && searchValue && ((0, jsx_runtime_1.jsx)("div", { className: "suggestionBar", children: searchSuggestion })),
167
169
  searchCloseButton: ((0, jsx_runtime_1.jsx)(searchCloseMoreButtons_1.default, { isNeedToShow: Boolean(searchValue.length), position: {
168
- top: '50%',
169
- right: '0',
170
- transform: 'translate(-50%, -50%)',
170
+ top: "50%",
171
+ right: "0",
172
+ transform: "translate(-50%, -50%)",
171
173
  }, clearSearchValue: setSearchValue })),
172
174
  })] }), isMobileOpen && searchValue && ((0, jsx_runtime_1.jsx)(SSuggestions, { children: searchSuggestion }))] }));
173
175
  };
@@ -15,6 +15,8 @@ const Urls_1 = require("../../../dto/common/Media/Urls");
15
15
  const env_1 = require("../../../store/env");
16
16
  const ScreenWidth_1 = require("../../../styles/ScreenWidth");
17
17
  const _3d_1 = require("../../../utils/3d");
18
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
19
+ const ItemType_1 = require("../../../dto/common/ItemType");
18
20
  // Styles
19
21
  const StyledSearchSuggestions = styled_components_1.default.div `
20
22
  position: relative;
@@ -69,11 +71,12 @@ const StyledSearchSuggestions = styled_components_1.default.div `
69
71
  // Components
70
72
  const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoading, }) => {
71
73
  const isNotFound = !assets?.length && !profiles?.length && !collections?.length;
72
- const { getMediaENVDomain, getVideoENVDomain, getAudioENVDomain, NEXT_PUBLIC_STATIC_DOMAIN, } = (0, env_1.useEnvStore)((state) => ({
74
+ const { getMediaENVDomain, getVideoENVDomain, getAudioENVDomain, NEXT_PUBLIC_STATIC_DOMAIN, NEXT_PUBLIC_ENV_VALUE, } = (0, env_1.useEnvStore)((state) => ({
73
75
  getMediaENVDomain: state.getMediaDomain,
74
76
  getVideoENVDomain: state.getVideoDomain,
75
77
  getAudioENVDomain: state.getAudioDomain,
76
78
  NEXT_PUBLIC_STATIC_DOMAIN: state.NEXT_PUBLIC_STATIC_DOMAIN,
79
+ NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
77
80
  }));
78
81
  return ((0, jsx_runtime_1.jsx)(StyledSearchSuggestions, { children: (0, jsx_runtime_1.jsxs)("div", { className: 'content', children: [isLoading && (0, jsx_runtime_1.jsx)(searchSuggestionsItemSkeleton_1.SearchSuggestionsItemsSkeleton, {}), !isLoading &&
79
82
  (isNotFound ? ((0, jsx_runtime_1.jsx)(searchSuggestionsNotFound_1.default, { notFoundText: searchTerm })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "scroller", children: [
@@ -116,7 +119,7 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
116
119
  // image and screenshots
117
120
  miniatureUrl = (0, Urls_1.getAssetImage)(currentMedia?.url, '/noContent/noContent.svg', Urls_1.mediaSizes.small, NEXT_PUBLIC_STATIC_DOMAIN);
118
121
  }
119
- return ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: asset?.getName(), link: asset.getAssetLink(), imgUrl: miniatureUrl, searchTerm: searchTerm }, `${asset?.getAssetId()}.${Math.random()}`));
122
+ return ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: asset?.getName(), link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["asset"]}/${asset.getAssetLink().replace(`${ItemType_1.LabelKeys.asset}/`, "")}`, imgUrl: miniatureUrl, searchTerm: searchTerm }, `${asset?.getAssetId()}.${Math.random()}`));
120
123
  }),
121
124
  },
122
125
  ]
@@ -125,7 +128,7 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
125
128
  ? [
126
129
  {
127
130
  caption: 'Collections',
128
- children: collections.map((collection) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: collection?.collectionTitle, link: `/collection/${collection?.collectionId}`, imgUrl: '/noContent/noContent.svg', searchTerm: searchTerm }, `${collection?.collectionId}.${Math.random()}`))),
131
+ children: collections.map((collection) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: collection?.collectionTitle, link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/collection/${collection?.collectionId}`, imgUrl: '/noContent/noContent.svg', searchTerm: searchTerm }, `${collection?.collectionId}.${Math.random()}`))),
129
132
  },
130
133
  ]
131
134
  : []),
@@ -133,7 +136,7 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
133
136
  ? [
134
137
  {
135
138
  caption: 'Profiles',
136
- children: profiles.map((profile) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { borderRadius: true, name: profile.getName() || '', link: `/profile/${profile.getUserId()}/nfts`, imgUrl: profile.getUserPic({
139
+ children: profiles.map((profile) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { borderRadius: true, name: profile.getName() || '', link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${profile.getUserId()}/nfts`, imgUrl: profile.getUserPic({
137
140
  mediaDomain: getMediaENVDomain(),
138
141
  }), additionalHTML: Boolean(profile.getFollowings()) && ((0, jsx_runtime_1.jsxs)("span", { className: 'additional', children: [profile.getFollowings(), " followers"] })), searchTerm: searchTerm }, profile.getUserId()))),
139
142
  },
@@ -1,17 +1,4 @@
1
- export declare const sideBarDataForDev: ({ isAuthorized, isDarkTheme, userId, }: {
2
- isAuthorized: boolean;
3
- isDarkTheme: boolean;
4
- userId: string;
5
- }) => {
6
- href: string;
7
- title: string;
8
- icon: import("react/jsx-runtime").JSX.Element;
9
- isExternalUrl: boolean;
10
- }[];
11
- export declare const sideBarDataForProd: ({ isAuthorized, userId, }: {
12
- isAuthorized: boolean;
13
- userId: string;
14
- }) => {
1
+ export declare const useSidebarData: () => {
15
2
  href: string;
16
3
  title: string;
17
4
  icon: import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.sideBarDataForProd = exports.sideBarDataForDev = void 0;
6
+ exports.useSidebarData = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const aboutLudo_svg_1 = __importDefault(require("../../public/sidebar/aboutLudo"));
9
9
  const aboutLudoDark_svg_1 = __importDefault(require("../../public/sidebar/aboutLudoDark"));
@@ -12,69 +12,83 @@ const explore_svg_1 = __importDefault(require("../../public/sidebar/explore"));
12
12
  const my_invites_svg_1 = __importDefault(require("../../public/sidebar/my-invites"));
13
13
  const rewards_svg_1 = __importDefault(require("../../public/sidebar/rewards"));
14
14
  const submitNft_svg_1 = __importDefault(require("../../public/sidebar/submitNft"));
15
- const sideBarDataForDev = ({ isAuthorized, isDarkTheme, userId, }) => {
15
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
16
+ const env_1 = require("../../store/env");
17
+ const store_1 = require("../../modules/user/store");
18
+ const interface_1 = require("@ludo.ninja/ui/build/dto/Theme/interface");
19
+ const styled_components_1 = require("styled-components");
20
+ const useSidebarData = () => {
21
+ const { isAuthorized, userId } = (0, store_1.useUserStore)((state) => ({
22
+ isAuthorized: state.isSignedIn,
23
+ userId: state.user?.userId,
24
+ }));
25
+ const { NEXT_PUBLIC_ENV_VALUE, isProd } = (0, env_1.useEnvStore)((state) => ({
26
+ NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
27
+ isProd: state.isProd,
28
+ }));
29
+ const { type } = (0, styled_components_1.useTheme)();
30
+ const isDarkTheme = type === interface_1.ThemeEnum.dark;
31
+ if (!isProd()) {
32
+ return [
33
+ {
34
+ href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"],
35
+ title: "Explore",
36
+ icon: (0, jsx_runtime_1.jsx)(explore_svg_1.default, {}),
37
+ isExternalUrl: false,
38
+ },
39
+ ...(isAuthorized
40
+ ? [
41
+ {
42
+ href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/rewards/${userId}`,
43
+ title: "Rewards",
44
+ icon: (0, jsx_runtime_1.jsx)(rewards_svg_1.default, {}),
45
+ isExternalUrl: false,
46
+ },
47
+ {
48
+ href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/invite-codes`,
49
+ title: "My invites",
50
+ icon: (0, jsx_runtime_1.jsx)(my_invites_svg_1.default, {}),
51
+ isExternalUrl: false,
52
+ },
53
+ ]
54
+ : []),
55
+ {
56
+ href: "https://apidocs.ludo.com/",
57
+ title: "API",
58
+ icon: (0, jsx_runtime_1.jsx)(api_svg_1.default, {}),
59
+ isExternalUrl: true,
60
+ },
61
+ {
62
+ href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"],
63
+ title: "Submit NFT",
64
+ icon: (0, jsx_runtime_1.jsx)(submitNft_svg_1.default, {}),
65
+ isExternalUrl: false,
66
+ },
67
+ {
68
+ href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"],
69
+ title: "About Ludo",
70
+ icon: isDarkTheme ? (0, jsx_runtime_1.jsx)(aboutLudoDark_svg_1.default, {}) : (0, jsx_runtime_1.jsx)(aboutLudo_svg_1.default, {}),
71
+ isExternalUrl: false,
72
+ },
73
+ ];
74
+ }
16
75
  return [
17
- {
18
- href: '/',
19
- title: 'Explore',
20
- icon: (0, jsx_runtime_1.jsx)(explore_svg_1.default, {}),
21
- isExternalUrl: false,
22
- },
23
76
  ...(isAuthorized
24
77
  ? [
25
78
  {
26
- href: `/rewards/${userId}`,
27
- title: 'Rewards',
79
+ href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/rewards/${userId}`,
80
+ title: "Rewards",
28
81
  icon: (0, jsx_runtime_1.jsx)(rewards_svg_1.default, {}),
29
82
  isExternalUrl: false,
30
83
  },
31
84
  {
32
- href: '/invite-codes',
33
- title: 'My invites',
85
+ href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/invite-codes`,
86
+ title: "My invites",
34
87
  icon: (0, jsx_runtime_1.jsx)(my_invites_svg_1.default, {}),
35
88
  isExternalUrl: false,
36
89
  },
37
90
  ]
38
91
  : []),
39
- {
40
- href: 'https://apidocs.ludo.com/',
41
- title: 'API',
42
- icon: (0, jsx_runtime_1.jsx)(api_svg_1.default, {}),
43
- isExternalUrl: true,
44
- },
45
- {
46
- href: '/',
47
- title: 'Submit NFT',
48
- icon: (0, jsx_runtime_1.jsx)(submitNft_svg_1.default, {}),
49
- isExternalUrl: false,
50
- },
51
- {
52
- href: '/',
53
- title: 'About Ludo',
54
- icon: isDarkTheme ? (0, jsx_runtime_1.jsx)(aboutLudoDark_svg_1.default, {}) : (0, jsx_runtime_1.jsx)(aboutLudo_svg_1.default, {}),
55
- isExternalUrl: false,
56
- },
57
92
  ];
58
93
  };
59
- exports.sideBarDataForDev = sideBarDataForDev;
60
- const sideBarDataForProd = ({ isAuthorized, userId, }) => {
61
- return [
62
- ...(isAuthorized
63
- ? [
64
- {
65
- href: `/rewards/${userId}`,
66
- title: 'Rewards',
67
- icon: (0, jsx_runtime_1.jsx)(rewards_svg_1.default, {}),
68
- isExternalUrl: false,
69
- },
70
- {
71
- href: '/invite-codes',
72
- title: 'My invites',
73
- icon: (0, jsx_runtime_1.jsx)(my_invites_svg_1.default, {}),
74
- isExternalUrl: false,
75
- },
76
- ]
77
- : []),
78
- ];
79
- };
80
- exports.sideBarDataForProd = sideBarDataForProd;
94
+ exports.useSidebarData = useSidebarData;
@@ -1,43 +1,18 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  const jsx_runtime_1 = require("react/jsx-runtime");
30
7
  const link_1 = __importDefault(require("next/link"));
31
- const styled_components_1 = __importStar(require("styled-components"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
32
9
  const sidebar_1 = require("@ludo.ninja/ui/build/components/sidebar");
33
- const interface_1 = require("@ludo.ninja/ui/build/dto/Theme/interface");
34
10
  const MainButton_1 = __importDefault(require("@ludo.ninja/ui/build/system/Buttons/MainButton"));
35
11
  const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
36
12
  const data_1 = require("./data");
37
13
  const sidebarInviteCodeLabel_1 = __importDefault(require("./sidebarInviteCodeLabel"));
38
14
  const useSignOut_1 = require("../../modules/user/auth/useSignOut");
39
15
  const store_1 = require("../../modules/user/store");
40
- const env_1 = require("../../store/env");
41
16
  const ui_1 = require("../../store/ui");
42
17
  const ScreenWidth_1 = require("../../styles/ScreenWidth");
43
18
  const Userpic_1 = __importDefault(require("../../system/Img/Userpic"));
@@ -79,6 +54,7 @@ const MenuItem = styled_components_1.default.div `
79
54
  padding: ${(0, _4k_1.adaptiveValueCalc)(12)} ${(0, _4k_1.adaptiveValueCalc)(4)};
80
55
  text-indent: ${(0, _4k_1.adaptiveValueCalc)(4)};
81
56
  border-radius: ${(0, _4k_1.adaptiveValueCalc)(4)};
57
+
82
58
  img {
83
59
  width: ${(0, _4k_1.adaptiveValueCalc)(20)};
84
60
  height: ${(0, _4k_1.adaptiveValueCalc)(20)};
@@ -91,25 +67,27 @@ const BeforeMenuContainer = styled_components_1.default.div `
91
67
 
92
68
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
93
69
  padding: ${(0, _4k_1.adaptiveValueCalc)(12)} 0;
94
- border-bottom: ${(0, _4k_1.adaptiveValueCalc)(1)} solid
95
- ${({ theme }) => theme.colors.divider};
70
+ border-bottom: ${(0, _4k_1.adaptiveValueCalc)(1)} solid ${({ theme }) => theme.colors.divider};
96
71
  }
97
72
  `;
98
73
  const SLink = (0, styled_components_1.default)(link_1.default) `
99
74
  &:not(:last-child) svg path {
100
75
  fill: ${({ theme }) => theme.colors.sidebarSvgPathFill};
101
76
  }
77
+
102
78
  .icon-wrapper {
103
79
  width: 20px;
104
80
  height: 20px;
105
81
  display: flex;
106
82
  align-items: center;
107
83
  justify-content: center;
84
+
108
85
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
109
86
  width: ${(0, _4k_1.adaptiveValueCalc)(20)};
110
87
  height: ${(0, _4k_1.adaptiveValueCalc)(20)};
88
+
111
89
  svg {
112
- transform: ${(props) => 'transform' in props.scale && props.scale.transform};
90
+ transform: ${(props) => "transform" in props.scale && props.scale.transform};
113
91
  }
114
92
  }
115
93
  }
@@ -117,7 +95,6 @@ const SLink = (0, styled_components_1.default)(link_1.default) `
117
95
  // Component
118
96
  const Sidebar = () => {
119
97
  const redirectToLoginWindow = (0, auth_1.useRedirectToLoginWindow)();
120
- const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
121
98
  const closeSidebar = (0, ui_1.useUiStore)((state) => state.closeSidebar);
122
99
  const isSidebarOpen = (0, ui_1.useUiStore)((state) => state.isSidebarOpen);
123
100
  const isAuthorized = (0, store_1.useUserStore)((state) => state.isSignedIn);
@@ -125,13 +102,9 @@ const Sidebar = () => {
125
102
  const signOut = (0, useSignOut_1.useSignOut)();
126
103
  const { deviceType } = (0, screen_1.useWindowDimensions)();
127
104
  const { isExtensionInstalled, openExtensionChromeStorePage, openExtension } = (0, useExtension_1.default)();
128
- const { wallets, userId } = getUser ?? [''];
129
- const { type } = (0, styled_components_1.useTheme)();
130
- const isDarkTheme = type === interface_1.ThemeEnum.dark;
105
+ const { wallets, userId } = getUser ?? [""];
131
106
  // Todo fav-list
132
- const sideBarData = isProd()
133
- ? (0, data_1.sideBarDataForProd)({ userId, isAuthorized })
134
- : (0, data_1.sideBarDataForDev)({ userId, isAuthorized, isDarkTheme });
107
+ const sideBarData = (0, data_1.useSidebarData)();
135
108
  const { windowDimensions } = (0, screen_1.useWindowDimensionsWithServerInitial)();
136
109
  return ((0, jsx_runtime_1.jsx)(sidebar_1.Sidebar, { closeSidebar: closeSidebar, isOpen: isSidebarOpen, handle: {
137
110
  login: () => {
@@ -140,18 +113,18 @@ const Sidebar = () => {
140
113
  },
141
114
  logout: signOut,
142
115
  }, isAuthorized: isAuthorized, userWallets: wallets, slots: {
143
- menu: sideBarData.map(({ title, href, icon, isExternalUrl }) => ((0, jsx_runtime_1.jsxs)(SLink, { href: href, target: isExternalUrl ? '_blank' : '_self', onClick: closeSidebar, passHref: isExternalUrl, scale: (0, scale_1.getAdaptiveScale)({ windowDimensions, currentSize: 1 }), children: [(0, jsx_runtime_1.jsx)("span", { className: "icon-wrapper", children: icon }), title] }, title))),
116
+ menu: sideBarData.map(({ title, href, icon, isExternalUrl }) => ((0, jsx_runtime_1.jsxs)(SLink, { href: href, target: isExternalUrl ? "_blank" : "_self", onClick: closeSidebar, passHref: isExternalUrl, scale: (0, scale_1.getAdaptiveScale)({ windowDimensions, currentSize: 1 }), children: [(0, jsx_runtime_1.jsx)("span", { className: "icon-wrapper", children: icon }), title] }, title))),
144
117
  userPicture: ({ children, height, width, isNeedBoxTransform }) => ((0, jsx_runtime_1.jsx)(Userpic_1.default, { width: width, height: height, userId: userId, isNeedBoxTransform: isNeedBoxTransform, children: children })),
145
118
  inviteCode: (0, jsx_runtime_1.jsx)(sidebarInviteCodeLabel_1.default, {}),
146
- ...(deviceType == 'isDesktop' && isAuthorized
119
+ ...(deviceType == "isDesktop" && isAuthorized
147
120
  ? {
148
121
  beforeMenu: ((0, jsx_runtime_1.jsx)(BeforeMenuContainer, { children: isExtensionInstalled ? ((0, jsx_runtime_1.jsxs)(MenuItem, { onClick: () => {
149
122
  closeSidebar();
150
123
  openExtension();
151
- }, children: [(0, jsx_runtime_1.jsx)("img", { src: "/sidebar/ludoX.svg", alt: "Ludo X", width: 20, height: 20 }), "Open Ludo X"] })) : ((0, jsx_runtime_1.jsx)("div", { style: { padding: '12px 0' }, children: (0, jsx_runtime_1.jsx)(MainButton_1.default, { onClick: () => {
124
+ }, children: [(0, jsx_runtime_1.jsx)("img", { src: "/sidebar/ludoX.svg", alt: "Ludo X", width: 20, height: 20 }), "Open Ludo X"] })) : ((0, jsx_runtime_1.jsx)("div", { style: { padding: "12px 0" }, children: (0, jsx_runtime_1.jsx)(MainButton_1.default, { onClick: () => {
152
125
  closeSidebar();
153
126
  openExtensionChromeStorePage();
154
- }, text: 'Install Ludo X now', variant: 'primaryM' }) })) })),
127
+ }, text: "Install Ludo X now", variant: "primaryM" }) })) })),
155
128
  }
156
129
  : {}),
157
130
  } }));
@@ -10,6 +10,8 @@ const store_1 = require("../../../modules/user/store");
10
10
  const ScreenWidth_1 = require("../../../styles/ScreenWidth");
11
11
  const ExperienceLabel_1 = __importDefault(require("../../../system/Labels/ExperienceLabel"));
12
12
  const InviteLabel_1 = __importDefault(require("../../../system/Labels/InviteLabel"));
13
+ const env_1 = require("../../../store/env");
14
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
13
15
  // Styles
14
16
  const StyledSidebarInviteCodeLabel = styled_components_1.default.div `
15
17
  display: flex;
@@ -31,8 +33,9 @@ const SidebarInviteCodeLabel = () => {
31
33
  isLoadingProfileData: state.isLoadingProfileData,
32
34
  inviteCodes: state.inviteCodes,
33
35
  }));
36
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
34
37
  const unUsedInviteCodes = inviteCodes?.filter((code) => !code.isUsed);
35
- return ((0, jsx_runtime_1.jsxs)(StyledSidebarInviteCodeLabel, { children: [(0, jsx_runtime_1.jsx)(ExperienceLabel_1.default, { value: userExp.xps, link: `/rewards/${getUser?.userId}`, loading: isLoadingExp || !!errorExp }), !!unUsedInviteCodes && ((0, jsx_runtime_1.jsx)(InviteLabel_1.default, { value: unUsedInviteCodes.length, link: '/invite-codes', loading: isLoadingProfileData }))] }));
38
+ return ((0, jsx_runtime_1.jsxs)(StyledSidebarInviteCodeLabel, { children: [(0, jsx_runtime_1.jsx)(ExperienceLabel_1.default, { value: userExp.xps, link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/rewards/${getUser?.userId}`, loading: isLoadingExp || !!errorExp }), !!unUsedInviteCodes && ((0, jsx_runtime_1.jsx)(InviteLabel_1.default, { value: unUsedInviteCodes.length, link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}/invite-codes`, loading: isLoadingProfileData }))] }));
36
39
  };
37
40
  // Export
38
41
  exports.default = SidebarInviteCodeLabel;
@@ -39,6 +39,8 @@ const SWrapperLink = styled_components_1.default.a `
39
39
  ${boxTransform_1.default};
40
40
  width: 252px;
41
41
  overflow: hidden;
42
+ display: flex;
43
+ flex-direction: column;
42
44
 
43
45
  &:hover ${Headicons_1.default} {
44
46
  transition: 0.2s opacity ease-in;
@@ -113,6 +115,10 @@ const StyledCardContent = styled_components_1.default.div `
113
115
  color: ${colors_2.TextGrayColor};
114
116
  font-size: 13px;
115
117
  flex: 1;
118
+ -webkit-line-clamp: 6;
119
+ -webkit-box-orient: vertical;
120
+ overflow: hidden;
121
+ display: -webkit-box;
116
122
  }
117
123
 
118
124
  .secondName {
@@ -9,9 +9,10 @@ const api_1 = require("@ludo.ninja/api");
9
9
  const env_1 = require("../../../store/env");
10
10
  const useRevokeToken_1 = __importDefault(require("../../../api/server-identities/mutations/useRevokeToken"));
11
11
  const store_1 = require("../store");
12
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
12
13
  const useSignOut = () => {
13
- const { NEXT_PUBLIC_WELCOME_HOST, NEXT_PUBLIC_ENV_DOMAIN } = (0, env_1.useEnvStore)((state) => ({
14
- NEXT_PUBLIC_WELCOME_HOST: state.NEXT_PUBLIC_WELCOME_HOST,
14
+ const { NEXT_PUBLIC_ENV_VALUE, NEXT_PUBLIC_ENV_DOMAIN } = (0, env_1.useEnvStore)((state) => ({
15
+ NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
15
16
  NEXT_PUBLIC_ENV_DOMAIN: state.NEXT_PUBLIC_ENV_DOMAIN,
16
17
  }));
17
18
  const { revokeToken } = (0, useRevokeToken_1.default)();
@@ -30,7 +31,7 @@ const useSignOut = () => {
30
31
  domain: NEXT_PUBLIC_ENV_DOMAIN,
31
32
  });
32
33
  setUser(null);
33
- window.location.replace(NEXT_PUBLIC_WELCOME_HOST);
34
+ window.location.replace(ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]);
34
35
  }
35
36
  };
36
37
  };
@@ -1,11 +1,7 @@
1
1
  interface IEnvStore {
2
2
  NODE_ENV: string;
3
3
  NEXT_PUBLIC_ENV_VALUE: string;
4
- NEXT_PUBLIC_AUTH_HOST: string;
5
- NEXT_PUBLIC_WELCOME_HOST: string;
6
4
  NEXT_PUBLIC_ENV_DOMAIN: string;
7
- NEXT_PUBLIC_SITE_URL: string;
8
- NEXT_PUBLIC_ENV_SEARCH_DOMAIN: string;
9
5
  NEXT_PUBLIC_STATIC_DOMAIN: string;
10
6
  getStaticDomain: (env?: string) => string;
11
7
  getMediaDomain: (env?: string) => string;
@@ -5,11 +5,7 @@ const next_zustand_1 = require("next-zustand");
5
5
  const creators = (0, next_zustand_1.createProvider)()((setState, getState) => ({
6
6
  NODE_ENV: '',
7
7
  NEXT_PUBLIC_ENV_VALUE: '',
8
- NEXT_PUBLIC_AUTH_HOST: '',
9
- NEXT_PUBLIC_WELCOME_HOST: '',
10
8
  NEXT_PUBLIC_ENV_DOMAIN: '',
11
- NEXT_PUBLIC_SITE_URL: '',
12
- NEXT_PUBLIC_ENV_SEARCH_DOMAIN: '',
13
9
  NEXT_PUBLIC_STATIC_DOMAIN: '',
14
10
  getStaticDomain: (env) => {
15
11
  const { NEXT_PUBLIC_STATIC_DOMAIN } = getState();
@@ -1,9 +1,9 @@
1
- import { searchSchema as schema } from '@ludo.ninja/api';
1
+ import { searchSchema as schema } from "@ludo.ninja/api";
2
2
  import GalleryEntityV2 from '../../../dto/GalleryEntityV2';
3
3
  import { TCreationAndCollection } from '../../../modules/virtuoso/types';
4
4
  export type RemoveToolsType = {
5
5
  gallery?: GalleryEntityV2;
6
- removeFn: (itemType: 'asset' | 'collection') => void;
6
+ removeFn: (itemType: "asset" | "collection") => void;
7
7
  };
8
8
  interface ICheckboxState {
9
9
  isShowCheckbox?: boolean;
@@ -48,6 +48,8 @@ const Head_1 = __importDefault(require("../Styles/Head"));
48
48
  const Headicons_1 = __importDefault(require("../Styles/Headicons"));
49
49
  const likes_1 = __importDefault(require("../../../hooks/likes"));
50
50
  const useToGalleryAsset_1 = require("../../../modules/gallery/useToGalleryAsset");
51
+ const ItemType_1 = require("../../../dto/common/ItemType");
52
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
51
53
  // Styles
52
54
  const StyledRegularCard = styled_components_1.default.div `
53
55
  position: relative;
@@ -55,23 +57,23 @@ const StyledRegularCard = styled_components_1.default.div `
55
57
  border-radius: 6px;
56
58
  ${boxShadow_1.default};
57
59
  ${boxTransform_1.default};
58
- // ${(props) => (props.isNeedTransform ? null : boxTransform_1.default)}
60
+ // ${(props) => (props.isNeedTransform ? null : boxTransform_1.default)}
59
61
 
60
- min-height: ${(props) => (props.isNeedHeight ? '346px' : '')};
62
+ min-height: ${(props) => (props.isNeedHeight ? "346px" : "")};
61
63
 
62
64
  ${(props) => props.isShowCheckbox
63
65
  ? (0, styled_components_1.css) `
64
- ${Headicons_1.default} {
65
- transition: 0.2s opacity ease-in;
66
- opacity: 1 !important;
67
- }
68
- `
66
+ ${Headicons_1.default} {
67
+ transition: 0.2s opacity ease-in;
68
+ opacity: 1 !important;
69
+ }
70
+ `
69
71
  : (0, styled_components_1.css) `
70
- &:hover ${Headicons_1.default} {
71
- transition: 0.2s opacity ease-in;
72
- opacity: 1 !important;
73
- }
74
- `}
72
+ &:hover ${Headicons_1.default} {
73
+ transition: 0.2s opacity ease-in;
74
+ opacity: 1 !important;
75
+ }
76
+ `}
75
77
  .linkRegularCard {
76
78
  display: flex;
77
79
  height: 100%;
@@ -80,18 +82,18 @@ const StyledRegularCard = styled_components_1.default.div `
80
82
 
81
83
  ${ScreenWidth_1.mediaQuery.maxWidthTablet} {
82
84
  width: 164px;
83
- min-height: ${(props) => (props.isNeedHeight ? '258px' : '')};
85
+ min-height: ${(props) => (props.isNeedHeight ? "258px" : "")};
84
86
  }
85
87
 
86
88
  ${ScreenWidth_1.mediaQuery.mobile} {
87
89
  width: 154px;
88
- min-height: ${(props) => (props.isNeedHeight ? '244px' : '')};
90
+ min-height: ${(props) => (props.isNeedHeight ? "244px" : "")};
89
91
  }
90
92
 
91
93
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
92
94
  border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
93
95
 
94
- min-height: ${(props) => props.isNeedHeight ? (0, _4k_1.adaptiveValueCalc)(346) : ''};
96
+ min-height: ${(props) => props.isNeedHeight ? (0, _4k_1.adaptiveValueCalc)(346) : ""};
95
97
  }
96
98
  `;
97
99
  // Component
@@ -106,6 +108,7 @@ const CreationCardWithCheckboxState = (props) => {
106
108
  exports.CreationCardWithCheckboxState = CreationCardWithCheckboxState;
107
109
  const CreationCard = ({ creationName, creation, isNeedHeight, likesDynamicInfo, toolsForRemove, isMobile, isLoadingLikes, isNeedShowMoreButton, isUserProfile, isRegularCard = true, isShowCheckbox, isActiveCheckbox, toggleCreationToGallery, currentMyGalleryId, }) => {
108
110
  const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
111
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
109
112
  const { likes, addLike, deleteLike } = (0, likes_1.default)({
110
113
  defaultLikesCount: likesDynamicInfo?.likesNum || creation.getLikes(),
111
114
  defaultIsLiked: likesDynamicInfo?.isLikedByUser || creation.getIsLiked(),
@@ -116,9 +119,21 @@ const CreationCard = ({ creationName, creation, isNeedHeight, likesDynamicInfo,
116
119
  // Todo cardLink
117
120
  const isHide = isProd();
118
121
  const HideLink = isHide ? react_1.default.Fragment : link_1.default;
122
+ const getLink = (href) => {
123
+ if (creation.getItemType() === ItemType_1.LabelKeys.asset) {
124
+ return `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["asset"]}/${href.replace(`${ItemType_1.LabelKeys.asset}/`, "")}`;
125
+ }
126
+ return href;
127
+ };
128
+ // const domain = ludoDomains[NEXT_PUBLIC_ENV_VALUE as TEnvValue]["app"];
129
+ // if (domain === window.origin) {
130
+ // router.push(`/rewards/${userId}`);
131
+ // } else {
132
+ // window.open(`${domain}/rewards/${userId}`);
133
+ // }
119
134
  return ((0, jsx_runtime_1.jsxs)(StyledRegularCard, { isNeedHeight: isNeedHeight, isNeedTransform: isNeedShowMoreButton, isShowCheckbox: isShowCheckbox, children: [isShowCheckbox && ((0, jsx_runtime_1.jsx)(CardCheckbox_1.default, { isActiveCheckbox: !!isActiveCheckbox, onChange: () => {
120
135
  toggleCreationToGallery?.(creation);
121
- } })), (0, jsx_runtime_1.jsxs)(HideLink, { className: "linkRegularCard", href: creation.getCreationLink(), children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [creation.detectMediaType().displaySingleMedia(), (0, jsx_runtime_1.jsx)(CardHead_1.CardHead, { isRegularCard: !!isRegularCard, isIconLiked: likes.isLiked, creation: creation, addLikeToCard: addLike, deleteLikeFromCard: deleteLike, isUserProfile: isUserProfile || false, isDisabled: !!isLoadingLikes, isShowCheckbox: isShowCheckbox, currentMyGalleryId: currentMyGalleryId })] }), (0, jsx_runtime_1.jsx)(CardContent_1.default, { creationName: creationName, firstName: creation.getCreatorAddress(), secondName: creation.getName(), cuttedSecondName: creation.getCuttedSecondName(!isMobile), itemId: creation.getItemId(), isNeedShowMoreButton: isNeedShowMoreButton || false, href: creation.getCreationLink(), children: (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "end", justifyContent: 'space-between', children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: creation.getLabel() }), !isProd() &&
122
- (isLoadingLikes ? ((0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { style: { borderRadius: '3px' }, height: "100%", width: "30px" })) : ((0, jsx_runtime_1.jsx)(CardLikes_1.default, { isLiked: likes.isLiked, likes: likes.likesCount })))] }) })] })] }));
136
+ } })), (0, jsx_runtime_1.jsxs)(HideLink, { className: "linkRegularCard", href: getLink(creation.getCreationLink()), children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [creation.detectMediaType().displaySingleMedia(), (0, jsx_runtime_1.jsx)(CardHead_1.CardHead, { isRegularCard: !!isRegularCard, isIconLiked: likes.isLiked, creation: creation, addLikeToCard: addLike, deleteLikeFromCard: deleteLike, isUserProfile: isUserProfile || false, isDisabled: !!isLoadingLikes, isShowCheckbox: isShowCheckbox, currentMyGalleryId: currentMyGalleryId })] }), (0, jsx_runtime_1.jsx)(CardContent_1.default, { creationName: creationName, firstName: creation.getCreatorAddress(), secondName: creation.getName(), cuttedSecondName: creation.getCuttedSecondName(!isMobile), itemId: creation.getItemId(), isNeedShowMoreButton: isNeedShowMoreButton || false, href: creation.getCreationLink(), children: (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "end", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: creation.getLabel() }), !isProd() &&
137
+ (isLoadingLikes ? ((0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { style: { borderRadius: "3px" }, height: "100%", width: "30px" })) : ((0, jsx_runtime_1.jsx)(CardLikes_1.default, { isLiked: likes.isLiked, likes: likes.likesCount })))] }) })] })] }));
123
138
  };
124
139
  exports.CreationCard = CreationCard;
@@ -18,6 +18,8 @@ const index_1 = require("../../index");
18
18
  const defaultImage_svg_1 = __importDefault(require("../../../public/gallery/defaultImage"));
19
19
  const CardCategory_1 = __importDefault(require("../CardContent/CardCategory"));
20
20
  const CardImage_1 = __importDefault(require("../CardMedia/CardImage"));
21
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
22
+ const env_1 = require("../../../store/env");
21
23
  // Styles
22
24
  const StyledMultiCard = styled_components_1.default.div `
23
25
  position: relative;
@@ -124,7 +126,8 @@ const MultiMediaCard = ({ gallery, assets, collections, }) => {
124
126
  };
125
127
  const secondName = gallery.getGalleryUsername() !== '' ? gallery.getGalleryUsername() : '';
126
128
  // const userCreationAddresses = gallery?.getGalleryCreations()[0]?.getOwnersAddresses();
127
- return ((0, jsx_runtime_1.jsx)(StyledMultiCard, { children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: gallery.getCreationLink(), children: [(0, jsx_runtime_1.jsx)(MultiHead_1.default, { children: renderMedia() }), (0, jsx_runtime_1.jsx)(CardContent_1.default, { firstName: gallery.getGalleryName(), secondName: secondName, wallets: gallery.getGalleryUserWallets(), isNeedShowMoreButton: false, itemId: gallery.getGalleryId(), children: (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "flex-end", justifyContent: 'space-between', children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: gallery.getLabel() }), (0, jsx_runtime_1.jsx)(CardLikes_1.default, { isLiked: false, likes: 0 })] }) })] }) }));
129
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
130
+ return ((0, jsx_runtime_1.jsx)(StyledMultiCard, { children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["app"]}${gallery.getCreationLink()}`, children: [(0, jsx_runtime_1.jsx)(MultiHead_1.default, { children: renderMedia() }), (0, jsx_runtime_1.jsx)(CardContent_1.default, { firstName: gallery.getGalleryName(), secondName: secondName, wallets: gallery.getGalleryUserWallets(), isNeedShowMoreButton: false, itemId: gallery.getGalleryId(), children: (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "flex-end", justifyContent: 'space-between', children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: gallery.getLabel() }), (0, jsx_runtime_1.jsx)(CardLikes_1.default, { isLiked: false, likes: 0 })] }) })] }) }));
128
131
  };
129
132
  // Export
130
133
  exports.default = MultiMediaCard;
@@ -17,6 +17,7 @@ const boxTransform_1 = __importDefault(require("../../../styles/mixins/boxTransf
17
17
  const ImageInterceptor_1 = require("../ImageInterceptor");
18
18
  const useFetchUserPic_1 = __importDefault(require("../../../api/server-medias/queries/useFetchUserPic"));
19
19
  const defaultUserpic_svg_1 = __importDefault(require("../../../public/defaultUserpics/defaultUserpic"));
20
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
20
21
  // Styles
21
22
  const StyledHeaderUserPic = styled_components_1.default.div `
22
23
  ${(props) => (props.isNeedBoxTransform ? boxTransform_1.default : null)}
@@ -76,7 +77,8 @@ const UserPic = ({ userId, width, height, isNeedBoxTransform, children, }) => {
76
77
  const renderSkeleton = () => {
77
78
  return (0, jsx_runtime_1.jsx)(react_loading_skeleton_1.default, { className: 'userPicImage' });
78
79
  };
79
- return ((0, jsx_runtime_1.jsx)(StyledHeaderUserPic, { isNeedBoxTransform: isNeedBoxTransform, imageWidth: `${width}px`, imageHeight: `${height}px`, children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `/profile/${userId}/nfts`, className: 'userPicBlock', children: [loading || isLoadingProfileData
80
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
81
+ return ((0, jsx_runtime_1.jsx)(StyledHeaderUserPic, { isNeedBoxTransform: isNeedBoxTransform, imageWidth: `${width}px`, imageHeight: `${height}px`, children: (0, jsx_runtime_1.jsxs)(link_1.default, { href: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${userId}/nfts`, className: 'userPicBlock', children: [loading || isLoadingProfileData
80
82
  ? renderSkeleton()
81
83
  : renderImageOrDefaultUserPic(), children] }) }));
82
84
  };
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useRedirectToLoginWindow = void 0;
4
4
  const env_1 = require("../../store/env");
5
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
5
6
  const useRedirectToLoginWindow = () => {
6
- const NEXT_PUBLIC_AUTH_HOST = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_AUTH_HOST);
7
- return () => window.open(`${NEXT_PUBLIC_AUTH_HOST}/login/?fallback_url=${window.location.href.replace(/\s/g, '')}`, '_self');
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
9
  };
9
10
  exports.useRedirectToLoginWindow = useRedirectToLoginWindow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.0.18",
3
+ "version": "2.1.1",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",