@ludo.ninja/components 2.2.26 → 2.2.28

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.
@@ -31,6 +31,7 @@ const useDislikeOpportunity_1 = require("../../api/server-opportunities/mutation
31
31
  const useLikeOpportunity_1 = require("../../api/server-opportunities/mutations/useLikeOpportunity");
32
32
  const vars_1 = require("../../fonts/vars");
33
33
  const heart_svg_1 = __importDefault(require("../../public/cards/heart"));
34
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
34
35
  const SWrapperLink = styled_components_1.default.a `
35
36
  position: relative;
36
37
  background-color: ${colors_1.WhiteColor};
@@ -226,6 +227,9 @@ const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) =>
226
227
  }, children: (0, jsx_runtime_1.jsx)(heart_svg_1.default, {}) }));
227
228
  };
228
229
  const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
230
+ const { NEXT_PUBLIC_ENV_VALUE } = (0, env_1.useEnvStore)((state) => ({
231
+ NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
232
+ }));
229
233
  const { windowDimensions } = (0, screen_1.useWindowDimensionsWithServerInitial)();
230
234
  const isMobile = !!(windowDimensions?.windowWidth &&
231
235
  windowDimensions.windowWidth <= ScreenWidth_1.ScreenWidth.DESKTOP);
@@ -236,7 +240,8 @@ const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
236
240
  }));
237
241
  const getMediaENVDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
238
242
  const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
239
- return ((0, jsx_runtime_1.jsxs)(SWrapperLink, { href: opportunity.shareLink || opportunity.projectUrl || "", target: "_blank", children: [(0, jsx_runtime_1.jsxs)(StyledCardHead, { children: [(0, jsx_runtime_1.jsx)(OpportunityImage, { alt: opportunity.name, src: opportunity.media
243
+ const opportunityLink = opportunity.opportunityType === 'TOKEN_AIRDROP' ? `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]['app']}/brand/${opportunity.opportunityId}` : (opportunity.shareLink || opportunity.projectUrl || "");
244
+ return ((0, jsx_runtime_1.jsxs)(SWrapperLink, { href: opportunityLink, target: "_blank", children: [(0, jsx_runtime_1.jsxs)(StyledCardHead, { children: [(0, jsx_runtime_1.jsx)(OpportunityImage, { alt: opportunity.name, src: opportunity.media
240
245
  ? `${getMediaENVDomain()}/opportunity-medias/${opportunity.media}`
241
246
  : "" }), (0, jsx_runtime_1.jsx)(Headicons_1.default, { isMobile: isMobile, onClick: (e) => {
242
247
  e.stopPropagation();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.2.26",
3
+ "version": "2.2.28",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",