@ludo.ninja/components 2.3.94 → 2.3.96
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/build/components/headers/header/index.js +2 -2
- package/build/components/headers/headerSearch/index.js +1 -2
- package/build/components/sidebar/sidebarInviteCodeLabel/index.js +9 -9
- package/build/components/userBadges/ambassadorBadge/index.d.ts +6 -0
- package/build/components/userBadges/ambassadorBadge/index.js +34 -0
- package/build/components/userBadges/curatorBadge/index.d.ts +6 -0
- package/build/components/userBadges/curatorBadge/index.js +34 -0
- package/build/modules/user/profileData/profileDataInitialization.js +2 -5
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ const ui_1 = require("../../../store/ui");
|
|
|
13
13
|
const auth_1 = require("../../../utils/auth");
|
|
14
14
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
15
15
|
const env_1 = require("../../../store/env");
|
|
16
|
-
|
|
16
|
+
// import HeaderStreak from "@/components/headers/components/headerStreak";
|
|
17
17
|
// Component
|
|
18
18
|
const Header = () => {
|
|
19
19
|
const isSignedIn = (0, store_1.useUserStore)((state) => state.isSignedIn);
|
|
@@ -27,7 +27,7 @@ const Header = () => {
|
|
|
27
27
|
openSidebar,
|
|
28
28
|
}, slots: {
|
|
29
29
|
headerExpLabel: ((0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId || "" })),
|
|
30
|
-
headerDaysStreak:
|
|
30
|
+
// headerDaysStreak: <HeaderStreak tooltipPosition={'bottom'} />,
|
|
31
31
|
headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId || "" }),
|
|
32
32
|
logoLinkComponent: ({ children }) => (0, jsx_runtime_1.jsx)(link_1.default, { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE][isProd() ? "profile" : "app"], children: children }),
|
|
33
33
|
} }));
|
|
@@ -13,7 +13,6 @@ const ui_1 = require("../../../store/ui");
|
|
|
13
13
|
const auth_1 = require("../../../utils/auth");
|
|
14
14
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
15
15
|
const header_1 = require("@ludo.ninja/ui/build/components/header");
|
|
16
|
-
const headerStreak_1 = __importDefault(require("../components/headerStreak"));
|
|
17
16
|
// Component
|
|
18
17
|
const HeaderSearch = ({ showXP = true }) => {
|
|
19
18
|
const openSidebar = (0, ui_1.useUiStore)((state) => state.openSidebar);
|
|
@@ -28,7 +27,7 @@ const HeaderSearch = ({ showXP = true }) => {
|
|
|
28
27
|
}, slots: {
|
|
29
28
|
...(showXP ? {
|
|
30
29
|
headerExpLabel: (0, jsx_runtime_1.jsx)(headerExperienceLabel_1.default, { userId: getUser?.userId || "" }),
|
|
31
|
-
headerDaysStreak:
|
|
30
|
+
// headerDaysStreak: <HeaderStreak tooltipPosition={'bottom'} hideOnTablet={!isProd()} />
|
|
32
31
|
} : {}),
|
|
33
32
|
headerUserPick: (0, jsx_runtime_1.jsx)(headerUserPic_1.default, { userId: getUser?.userId || "" }),
|
|
34
33
|
logoLinkComponent: ({ children }) => ((0, jsx_runtime_1.jsx)("a", { href: ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE][isProd() ? "profile" : "app"], children: children })),
|
|
@@ -12,7 +12,7 @@ const ExperienceLabel_1 = __importDefault(require("../../../system/Labels/Experi
|
|
|
12
12
|
const InviteLabel_1 = __importDefault(require("../../../system/Labels/InviteLabel"));
|
|
13
13
|
const env_1 = require("../../../store/env");
|
|
14
14
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
15
|
-
|
|
15
|
+
// import UserStreak from "@/components/base/UserStreak";
|
|
16
16
|
// Styles
|
|
17
17
|
const StyledSidebarInviteCodeLabel = styled_components_1.default.div `
|
|
18
18
|
display: flex;
|
|
@@ -24,13 +24,13 @@ const StyledSidebarInviteCodeLabel = styled_components_1.default.div `
|
|
|
24
24
|
margin-top: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
25
25
|
}
|
|
26
26
|
`;
|
|
27
|
-
const StyledUserStreak = (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`;
|
|
27
|
+
// const StyledUserStreak = styled(UserStreak)`
|
|
28
|
+
// margin-top: 16px;
|
|
29
|
+
//
|
|
30
|
+
// ${mediaQuery.minWidthFourK} {
|
|
31
|
+
// margin-top: ${adaptiveValueCalc(16)};
|
|
32
|
+
// }
|
|
33
|
+
// `;
|
|
34
34
|
// Component
|
|
35
35
|
const SidebarInviteCodeLabel = () => {
|
|
36
36
|
const { getUser, userExp, isLoadingExp, errorExp, isLoadingProfileData, inviteCodes, } = (0, store_1.useUserStore)((state) => ({
|
|
@@ -43,7 +43,7 @@ const SidebarInviteCodeLabel = () => {
|
|
|
43
43
|
}));
|
|
44
44
|
const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
|
|
45
45
|
const unUsedInviteCodes = inviteCodes?.filter((code) => !code.isUsed);
|
|
46
|
-
return ((0, jsx_runtime_1.
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (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 }))] }) }));
|
|
47
47
|
};
|
|
48
48
|
// Export
|
|
49
49
|
exports.default = SidebarInviteCodeLabel;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const index_1 = require("../../../system/index");
|
|
8
|
+
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
9
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
10
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
|
+
const Wrapper = styled_components_1.default.div `
|
|
12
|
+
display: flex;
|
|
13
|
+
padding: 3px 11px;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
|
|
17
|
+
border-radius: 16px;
|
|
18
|
+
border: 2px solid transparent;
|
|
19
|
+
color: #4357C5;
|
|
20
|
+
background: linear-gradient(to right, #f3f4f9, #f3f4f9),
|
|
21
|
+
linear-gradient(160deg, #15D2FF 0%, #4C6DFF 100%);
|
|
22
|
+
background-clip: padding-box, border-box;
|
|
23
|
+
background-origin: padding-box, border-box;
|
|
24
|
+
|
|
25
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
26
|
+
padding: ${(0, _4k_1.adaptiveValueCalc)(3)} ${(0, _4k_1.adaptiveValueCalc)(11)};
|
|
27
|
+
border-radius: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
28
|
+
border: ${(0, _4k_1.adaptiveValueCalc)(2)} solid transparent;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const AmbassadorBadge = ({ className }) => {
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper, { className: className, children: (0, jsx_runtime_1.jsx)(index_1.H6, { children: "Ambassador" }) }));
|
|
33
|
+
};
|
|
34
|
+
exports.default = AmbassadorBadge;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const index_1 = require("../../../system/index");
|
|
8
|
+
const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
9
|
+
const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
10
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
|
+
const Wrapper = styled_components_1.default.div `
|
|
12
|
+
display: flex;
|
|
13
|
+
padding: 3px 11px;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
|
|
17
|
+
border-radius: 16px;
|
|
18
|
+
border: 2px solid transparent;
|
|
19
|
+
color: #32A73C;
|
|
20
|
+
background: linear-gradient(to right, #f3f4f9, #f3f4f9),
|
|
21
|
+
linear-gradient(160deg, #6BEB2E 0%, #29AF33 100%);
|
|
22
|
+
background-clip: padding-box, border-box;
|
|
23
|
+
background-origin: padding-box, border-box;
|
|
24
|
+
|
|
25
|
+
${ScreenWidth_1.mediaQuery.minWidthFourK} {
|
|
26
|
+
padding: ${(0, _4k_1.adaptiveValueCalc)(3)} ${(0, _4k_1.adaptiveValueCalc)(11)};
|
|
27
|
+
border-radius: ${(0, _4k_1.adaptiveValueCalc)(16)};
|
|
28
|
+
border: ${(0, _4k_1.adaptiveValueCalc)(2)} solid transparent;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const CuratorBadge = ({ className }) => {
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper, { className: className, children: (0, jsx_runtime_1.jsx)(index_1.H6, { children: "Curator" }) }));
|
|
33
|
+
};
|
|
34
|
+
exports.default = CuratorBadge;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ProfileDataInitialization = void 0;
|
|
7
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -9,7 +6,7 @@ const store_1 = require("../store");
|
|
|
9
6
|
const ui_1 = require("../../../store/ui");
|
|
10
7
|
const api_1 = require("@ludo.ninja/api");
|
|
11
8
|
const api_2 = require("@ludo.ninja/api");
|
|
12
|
-
|
|
9
|
+
// import useFetchMyActivityStreak from "@/api/server-experiences/queries/useFetchMyActivityStreak";
|
|
13
10
|
const getErrorAlertProps_1 = require("../../../utils/getErrorAlertProps");
|
|
14
11
|
const FetcherMyProfile = ( /*{ userId }: { userId: string }*/) => {
|
|
15
12
|
const openAlert = (0, ui_1.useUiStore)((state) => state.openAlert);
|
|
@@ -54,7 +51,7 @@ const FetcherMyProfile = ( /*{ userId }: { userId: string }*/) => {
|
|
|
54
51
|
setIsLoadingProfileData(false);
|
|
55
52
|
},
|
|
56
53
|
});
|
|
57
|
-
|
|
54
|
+
// useFetchMyActivityStreak()
|
|
58
55
|
return null;
|
|
59
56
|
};
|
|
60
57
|
const ProfileDataInitialization = () => {
|