@ludo.ninja/components 2.4.6 → 2.4.8
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/sidebar/sidebarInviteCodeLabel/index.js +6 -0
- package/build/components/userBadges/shootingStarBadge/index.d.ts +7 -0
- package/build/components/userBadges/shootingStarBadge/index.js +34 -0
- package/build/modules/user/profileData/profileDataInitialization.js +3 -3
- package/package.json +2 -2
|
@@ -37,6 +37,7 @@ const _4k_1 = require("@ludo.ninja/ui/build/utils/4k");
|
|
|
37
37
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
38
38
|
const educatorBadge_1 = __importDefault(require("../../userBadges/educatorBadge"));
|
|
39
39
|
const ambassadorBadge_1 = __importDefault(require("../../userBadges/ambassadorBadge"));
|
|
40
|
+
const shootingStarBadge_1 = __importDefault(require("../../userBadges/shootingStarBadge"));
|
|
40
41
|
const typography_1 = require("@ludo.ninja/ui/build/styles/typography");
|
|
41
42
|
// import UserStreak from "@/components/base/UserStreak";
|
|
42
43
|
// Styles
|
|
@@ -66,6 +67,9 @@ const BadgeStyles = (0, styled_components_1.css) `
|
|
|
66
67
|
const SidebarEducatorBadge = (0, styled_components_1.default)(educatorBadge_1.default) `
|
|
67
68
|
${BadgeStyles};
|
|
68
69
|
`;
|
|
70
|
+
const SidebarShootingStarBadge = (0, styled_components_1.default)(shootingStarBadge_1.default) `
|
|
71
|
+
${BadgeStyles};
|
|
72
|
+
`;
|
|
69
73
|
const SidebarAmbassadorBadge = (0, styled_components_1.default)(ambassadorBadge_1.default) `
|
|
70
74
|
${BadgeStyles};
|
|
71
75
|
`;
|
|
@@ -87,6 +91,8 @@ const SidebarInviteCodeLabel = () => {
|
|
|
87
91
|
switch (profileData?.getBoost()) {
|
|
88
92
|
case 'EDUCATOR':
|
|
89
93
|
return (0, jsx_runtime_1.jsx)(SidebarEducatorBadge, { backgroundColor: '#ffffff' });
|
|
94
|
+
case 'SHOOTING_STAR':
|
|
95
|
+
return (0, jsx_runtime_1.jsx)(SidebarShootingStarBadge, { backgroundColor: '#ffffff' });
|
|
90
96
|
case 'AMBASSADOR':
|
|
91
97
|
return (0, jsx_runtime_1.jsx)(SidebarAmbassadorBadge, { backgroundColor: '#ffffff' });
|
|
92
98
|
default:
|
|
@@ -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 Text_1 = require("@ludo.ninja/ui/build/system/Text");
|
|
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: #E77D03;
|
|
20
|
+
background: ${({ background }) => `linear-gradient(to right, ${background}, ${background})`},
|
|
21
|
+
linear-gradient(160deg, #FFE500 0%, #FF9419 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 ShootingStarBadge = ({ className, backgroundColor = '#f3f4f9' }) => {
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper, { className: className, background: backgroundColor, children: (0, jsx_runtime_1.jsx)(Text_1.H6, { children: "Shooting Star" }) }));
|
|
33
|
+
};
|
|
34
|
+
exports.default = ShootingStarBadge;
|
|
@@ -34,10 +34,10 @@ const FetcherMyProfile = ( /*{ userId }: { userId: string }*/) => {
|
|
|
34
34
|
}
|
|
35
35
|
if (fetchMyProfile.xps) {
|
|
36
36
|
setUserExp({
|
|
37
|
-
levelMaxXps: fetchMyProfile.levelMaxXps,
|
|
38
|
-
levelMinXps: fetchMyProfile.levelMinXps,
|
|
37
|
+
// levelMaxXps: fetchMyProfile.levelMaxXps,
|
|
38
|
+
// levelMinXps: fetchMyProfile.levelMinXps,
|
|
39
39
|
xps: fetchMyProfile.xps,
|
|
40
|
-
level: fetchMyProfile.level,
|
|
40
|
+
// level: fetchMyProfile.level,
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
if (fetchMyProfile.inviteCodes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludo.ninja/components",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"publish": "npm publish --access public -workspace @ludo.ninja/components"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ludo.ninja/api": "^3.2.
|
|
26
|
+
"@ludo.ninja/api": "^3.2.47",
|
|
27
27
|
"@next/third-parties": "^15.3.4",
|
|
28
28
|
"@react-three/drei": "^9.68.3",
|
|
29
29
|
"@react-three/fiber": "^8.13.0",
|