@ludo.ninja/components 2.4.48 → 2.4.49
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.
|
@@ -113,8 +113,8 @@ const LudoEducatorModal = ({ userId, onBoostAdded, boostType, className, style }
|
|
|
113
113
|
const twitterUserName = social?.twitter?.split("https://x.com/")?.[1] || "";
|
|
114
114
|
const { followStatus, followStatusLoading } = (0, useCheckFollow_1.useCheckFollow)(twitterUserName);
|
|
115
115
|
const { followDiscordStatus, followDiscordStatusLoading } = (0, useCheckDiscordFollow_1.useCheckDiscordFollow)();
|
|
116
|
-
const { setEducatorBoost, loadingSetEducatorBoost } = (0, useSetEducatorBoost_1.default)();
|
|
117
|
-
const { setShootingStarBoost, loadingSetShootingStarBoost } = (0, useSetShootingStarBoost_1.default)();
|
|
116
|
+
const { setEducatorBoost, loadingSetEducatorBoost, isSetEducatorBoost } = (0, useSetEducatorBoost_1.default)();
|
|
117
|
+
const { setShootingStarBoost, loadingSetShootingStarBoost, isSetShootingStarBoost } = (0, useSetShootingStarBoost_1.default)();
|
|
118
118
|
const isSocialsConnected = social?.twitter && social?.telegramLink;
|
|
119
119
|
const isCheckListDone = followStatus?.following && isSocialsConnected && social?.telegramId;
|
|
120
120
|
const isShootingStarCheckListDone = isCheckListDone && followDiscordStatus?.following && social?.discordId;
|
|
@@ -123,6 +123,8 @@ const LudoEducatorModal = ({ userId, onBoostAdded, boostType, className, style }
|
|
|
123
123
|
const closeModalSidebarPortal = (0, ui_1.useUiStore)((state) => state.closeModalSidebarPortal);
|
|
124
124
|
const handleBecomeLudoEducator = () => {
|
|
125
125
|
setEducatorBoost().then(() => {
|
|
126
|
+
if (!isSetEducatorBoost)
|
|
127
|
+
return;
|
|
126
128
|
onBoostAdded && onBoostAdded();
|
|
127
129
|
closeModalSidebarPortal();
|
|
128
130
|
openModalSidebarPortal((0, jsx_runtime_1.jsx)(Congratulations_1.default, {}));
|
|
@@ -130,6 +132,8 @@ const LudoEducatorModal = ({ userId, onBoostAdded, boostType, className, style }
|
|
|
130
132
|
};
|
|
131
133
|
const handleBecomeLudoShootingStar = () => {
|
|
132
134
|
setShootingStarBoost().then(() => {
|
|
135
|
+
if (!isSetShootingStarBoost)
|
|
136
|
+
return;
|
|
133
137
|
onBoostAdded && onBoostAdded();
|
|
134
138
|
closeModalSidebarPortal();
|
|
135
139
|
openModalSidebarPortal((0, jsx_runtime_1.jsx)(Congratulations_1.default, { message: "You are now a Ludo Shooting Star! Check how you can take advantage of it." }));
|