Skip to content

Commit a99774b

Browse files
authored
Merge pull request #449 from Itheum/stg
1.15.6: STG->MAIN
2 parents c5de51a + 4170846 commit a99774b

File tree

9 files changed

+188
-145
lines changed

9 files changed

+188
-145
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "explorer-dapp",
33
"description": "Itheum Explorer is a DApp for the public to explore and visualize data within the Itheum protocol",
4-
"version": "1.15.5",
4+
"version": "1.15.6",
55
"author": "Itheum",
66
"license": "GPL-3.0-or-later",
77
"dependencies": {
@@ -35,7 +35,7 @@
3535
"react-dom": "18.2.0",
3636
"react-hot-toast": "2.4.1",
3737
"react-inlinesvg": "3.0.3",
38-
"react-pdf": "7.7.1",
38+
"react-pdf": "8.0.2",
3939
"react-router-dom": "6.22.3",
4040
"react-slick": "0.30.2",
4141
"react-vertical-timeline-component": "3.6.0",
1.15 MB
Loading

src/components/NftMediaComponent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ const NftMediaComponent: React.FC<NftMediaComponentProps> = (props) => {
2525
) : (
2626
<div className=" flex">
2727
<ImageSlider
28+
autoSlide={true}
2829
media={nftMedia.map((item) => ({
2930
url: item.url,
3031
type: item.fileType,
3132
}))}
32-
/>{" "}
33+
/>
3334
</div>
3435
)}
3536
</div>

src/pages/Account/MyListed/index.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import React, { useEffect, useState } from "react";
22
import { DataNft, Offer } from "@itheum/sdk-mx-data-nft";
33
import { Address } from "@multiversx/sdk-core/out";
4+
import { ExternalLink } from "lucide-react";
45
import { Loader, MXAddressLink } from "components";
6+
import { HeaderComponent } from "components/Layout/HeaderComponent";
7+
import NftMediaComponent from "components/NftMediaComponent";
58
import { MARKETPLACE_DETAILS_PAGE } from "config";
69
import { useGetAccount, useGetNetworkConfig, useGetPendingTransactions } from "hooks";
10+
import { Card, CardContent } from "libComponents/Card";
711
import { dataNftMarket } from "libs/mvx";
12+
import { NftMedia } from "libs/types";
813
import { convertToLocalString } from "libs/utils";
914
import { createNftId } from "libs/utils/token";
10-
import { HeaderComponent } from "components/Layout/HeaderComponent";
11-
import { Card, CardContent } from "libComponents/Card";
12-
import { ExternalLink } from "lucide-react";
13-
import ImageSlider from "components/ImageSlider";
14-
import NftMediaComponent from "components/NftMediaComponent";
15-
import { NftMedia } from "libs/types";
1615

1716
export const MyListed = () => {
1817
const {

src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzBase.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@ const GiveBitzBase = (props: GiveBitzBaseProps) => {
3131
const updateGivenBitzSum = useAccountStore((state) => state.updateGivenBitzSum);
3232
const updateBitzBalance = useAccountStore((state) => state.updateBitzBalance);
3333
const [dataBounties, setDataBounties] = useState<GiveBitzDataBounty[]>([]);
34-
34+
const [fetchingDataBountiesReceivedSum, setFetchingDataBountiesReceivedSum] = useState<boolean>(true);
3535
useEffect(() => {
36-
const highlighters = document.querySelectorAll("[data-highlighter]");
37-
highlighters.forEach((highlighter) => {
38-
new Highlighter(highlighter);
39-
});
36+
setFetchingDataBountiesReceivedSum(true);
4037
const fetchDataBounties = async () => {
4138
const _dataBounties: GiveBitzDataBounty[] = await Promise.all(
4239
getDataBounties().map(async (item: GiveBitzDataBounty) => {
@@ -48,10 +45,17 @@ const GiveBitzBase = (props: GiveBitzBaseProps) => {
4845

4946
setDataBounties(sortedDataBounties);
5047
};
51-
5248
fetchDataBounties();
49+
setFetchingDataBountiesReceivedSum(false);
5350
}, []);
5451

52+
useEffect(() => {
53+
const highlighters = document.querySelectorAll("[data-highlighter]");
54+
highlighters.forEach((highlighter) => {
55+
new Highlighter(highlighter);
56+
});
57+
}, [dataBounties]);
58+
5559
useEffect(() => {
5660
if (!chainID) {
5761
return;
@@ -357,12 +361,12 @@ const GiveBitzBase = (props: GiveBitzBaseProps) => {
357361
<div
358362
className="flex flex-col md:flex-row md:flex-wrap gap-4 items-center md:items-start justify-center md:justify-start w-full antialiased pt-4 relative h-[100%] "
359363
style={{ backgroundImage: `url(${bounty})`, objectFit: "scale-down", backgroundSize: "contain", backgroundRepeat: "no-repeat" }}>
360-
{dataBounties ? (
364+
{!fetchingDataBountiesReceivedSum ? (
361365
dataBounties.map((item: GiveBitzDataBounty) => {
362366
return (
363367
<PowerUpBounty
364368
key={item.bountyId}
365-
{...item}
369+
bounty={item}
366370
sendPowerUp={sendPowerUp}
367371
fetchGivenBitsForGetter={fetchGivenBitsForGetter}
368372
fetchGetterLeaderBoard={fetchGetterLeaderBoard}

src/pages/AppMarketplace/GetBitz/GiveBitz/PowerUpBounty.tsx

Lines changed: 67 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,25 @@ import { useGetNetworkConfig } from "@multiversx/sdk-dapp/hooks";
33
import { ExternalLinkIcon } from "lucide-react";
44
import moment from "moment-timezone";
55
import { Link } from "react-router-dom";
6+
import stampFinalized from "assets/img/getbitz/givebitz/stampFinalized.png";
67
import { MXAddressLink } from "components";
8+
import { MARKETPLACE_DETAILS_PAGE } from "config";
79
import { useGetAccount } from "hooks";
810
import GiveBitzLowerCard from "./GiveBitzLowerCard";
11+
import { GiveBitzDataBounty } from "../config";
12+
import { cn } from "libs/utils";
913

1014
type PowerUpBountyProps = {
11-
bountySubmitter: string;
12-
bountyId: string;
13-
title: string;
14-
summary: string;
15-
readMoreLink: string;
16-
submittedOnTs: number;
17-
fillPerks: string;
18-
receivedBitzSum?: number;
19-
giverCounts?: number;
15+
bounty: GiveBitzDataBounty;
2016
sendPowerUp: any;
2117
fetchGivenBitsForGetter: any;
2218
fetchGetterLeaderBoard: any;
2319
};
2420

2521
const PowerUpBounty = (props: PowerUpBountyProps) => {
26-
const {
27-
bountySubmitter,
28-
bountyId,
29-
title,
30-
summary,
31-
readMoreLink,
32-
submittedOnTs,
33-
fillPerks,
34-
giverCounts,
35-
receivedBitzSum,
36-
sendPowerUp,
37-
fetchGivenBitsForGetter,
38-
fetchGetterLeaderBoard,
39-
} = props;
22+
const { bounty, sendPowerUp, fetchGivenBitsForGetter, fetchGetterLeaderBoard } = props;
23+
const { bountySubmitter, bountyId, title, summary, readMoreLink, submittedOnTs, fillPerks, giverCounts, receivedBitzSum, finalizedDataNftIdentifier } =
24+
bounty;
4025
const {
4126
network: { explorerAddress },
4227
} = useGetNetworkConfig();
@@ -45,7 +30,18 @@ const PowerUpBounty = (props: PowerUpBountyProps) => {
4530
return (
4631
<div className="power-up-tile border min-w-[260px] max-w-[360px] relative rounded-3xl">
4732
<div className="group" data-highlighter>
48-
<div className="relative bg-[#35d9fa]/80 dark:bg-[#35d9fa]/30 rounded-3xl p-[2px] before:absolute before:w-96 before:h-96 before:-left-48 before:-top-48 before:bg-[#35d9fa] before:rounded-full before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-500 before:translate-x-[var(--mouse-x)] before:translate-y-[var(--mouse-y)] before:hover:opacity-20 before:z-30 before:blur-[100px] after:absolute after:inset-0 after:rounded-[inherit] after:opacity-0 after:transition-opacity after:duration-500 after:[background:_radial-gradient(250px_circle_at_var(--mouse-x)_var(--mouse-y),theme(colors.sky.400),transparent)] after:group-hover:opacity-100 after:z-10 overflow-hidden">
33+
<div
34+
className={cn(
35+
"relative bg-[#35d9fa]/80 dark:bg-[#35d9fa]/60 rounded-3xl p-[2px] before:absolute before:w-96 before:h-96 before:-left-48 before:-top-48 before:bg-[#35d9fa] before:rounded-full before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-500 before:translate-x-[var(--mouse-x)] before:translate-y-[var(--mouse-y)] before:hover:opacity-20 before:z-30 before:blur-[100px] after:absolute after:inset-0 after:rounded-[inherit] after:opacity-0 after:transition-opacity after:duration-500 after:[background:_radial-gradient(250px_circle_at_var(--mouse-x)_var(--mouse-y),theme(colors.sky.400),transparent)] after:group-hover:opacity-100 after:z-10 overflow-hidden",
36+
finalizedDataNftIdentifier ? " bg-[#35d9fa]/40 dark:bg-[#35d9fa]/20" : ""
37+
)}>
38+
{finalizedDataNftIdentifier && (
39+
<div className="ribbon absolute -top-2 -right-2 h-40 w-40 overflow-hidden before:absolute before:top-0 before:right-0 before:-z-[1] before:border-4 before:border-blue-500 after:absolute after:left-0 after:bottom-0 after:-z-[1] after:border-4 after:border-blue-500">
40+
<div className="absolute z-[100] -right-14 top-[43px] w-60 rotate-45 bg-gradient-to-br from-[#022629]/80 via-[#2495AC] to-[#35d9fa] py-2.5 text-center text-white shadow-md">
41+
Finalized
42+
</div>
43+
</div>
44+
)}
4945
<div className="relative h-full bg-neutral-950/40 dark:bg-neutral-950/60 rounded-[inherit] z-20 overflow-hidden p-4 md:p-8">
5046
<div className="flex justify-between items-center text-sm md:text-base">
5147
<div className=" bg-[#2495AC] dark:bg-[#022629] p-1 px-3 rounded-2xl shadow-inner shadow-[#35d9fa]/30 ">
@@ -89,23 +85,55 @@ const PowerUpBounty = (props: PowerUpBountyProps) => {
8985
})}
9086
</ul>
9187
</div>
92-
{address && (
93-
<GiveBitzLowerCard
94-
bountySubmitter={bountySubmitter}
95-
bountyId={bountyId}
96-
sendPowerUp={sendPowerUp}
97-
fetchGivenBitsForGetter={fetchGivenBitsForGetter}
98-
fetchGetterLeaderBoard={fetchGetterLeaderBoard}
99-
/>
88+
{address && finalizedDataNftIdentifier ? (
89+
<div className="h-[21rem]">
90+
<img src={stampFinalized} alt="Finalized" className="w-40 mx-auto" />
91+
<div className="text-center text-2xl bg-[#2495AC] dark:bg-[#022629] p-1 px-3 rounded-2xl shadow-inner shadow-[#35d9fa]/30">Finalized</div>
92+
<Link
93+
to={MARKETPLACE_DETAILS_PAGE + finalizedDataNftIdentifier}
94+
target="_blank"
95+
className="relative z-[100] mt-16 text-[#35d9fa] hover:underline md:text-xl flex flex-row gap-1 justify-center items-center">
96+
View Collection
97+
<ExternalLinkIcon width={20} />
98+
</Link>
99+
</div>
100+
) : (
101+
<>
102+
{address && (
103+
<GiveBitzLowerCard
104+
bountySubmitter={bountySubmitter}
105+
bountyId={bountyId}
106+
sendPowerUp={sendPowerUp}
107+
fetchGivenBitsForGetter={fetchGivenBitsForGetter}
108+
fetchGetterLeaderBoard={fetchGetterLeaderBoard}
109+
/>
110+
)}
111+
</>
100112
)}
101113

102-
<Link
103-
to="https://docs.google.com/forms/d/e/1FAIpQLSctQIpxSw-TnJzP52nUddJEun28DUcObqbUGH8ulHEd0MNmaQ/viewform?usp=sf_link"
104-
target="_blank"
105-
className="relative z-[100] mt-2 text-[#35d9fa] hover:underline text-xs md:text-sm flex flex-row gap-1 justify-center items-center">
106-
Fill this bounty as a Data NFT!
107-
<ExternalLinkIcon width={12} />
108-
</Link>
114+
{!finalizedDataNftIdentifier ? (
115+
<Link
116+
to="https://docs.google.com/forms/d/e/1FAIpQLSctQIpxSw-TnJzP52nUddJEun28DUcObqbUGH8ulHEd0MNmaQ/viewform?usp=sf_link"
117+
target="_blank"
118+
className="relative z-[100] mt-2 text-[#35d9fa] hover:underline text-xs md:text-sm flex flex-row gap-1 justify-center items-center">
119+
Fill this bounty as a Data NFT!
120+
<ExternalLinkIcon width={15} />
121+
</Link>
122+
) : !address ? (
123+
<div className="flex flex-row gap-2 justify-between items-center">
124+
<div className="text-center items-center bg-[#2495AC] dark:bg-[#022629] p-1 px-3 rounded-2xl shadow-inner shadow-[#35d9fa]/30">Finalized</div>
125+
126+
<Link
127+
to={MARKETPLACE_DETAILS_PAGE + finalizedDataNftIdentifier}
128+
target="_blank"
129+
className="relative z-[100] text-[#35d9fa] hover:underline text-xs md:text-sm flex flex-row gap-1 justify-center items-center">
130+
View Collection
131+
<ExternalLinkIcon width={15} />
132+
</Link>
133+
</div>
134+
) : (
135+
<div className="h-6"> </div>
136+
)}
109137
</>
110138
</div>
111139
</div>

src/pages/AppMarketplace/GetBitz/config.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface GiveBitzDataBounty {
1818
fillPerks: string;
1919
receivedBitzSum?: number;
2020
giverCounts?: number;
21+
finalizedDataNftIdentifier?: string;
2122
}
2223

2324
export function getCreatorCampaigns() {
@@ -74,6 +75,7 @@ export function getDataBounties() {
7475
readMoreLink: "https://docs.itheum.io/data-bounties/top-itheum-flippers",
7576
submittedOnTs: 1712713989,
7677
fillPerks: "Top 20 Leaderboard gets Data NFT once bounty launches. 10 Data NFTs to be dropped to random winners of top 100 Leaderboard.",
78+
finalizedDataNftIdentifier: "DATANFTFT-e936d4-0a",
7779
});
7880

7981
allBounties.push({
@@ -84,6 +86,7 @@ export function getDataBounties() {
8486
readMoreLink: "https://docs.itheum.io/data-bounties/top-ride-flippers",
8587
submittedOnTs: 1712713989,
8688
fillPerks: "Top 20 Leaderboard gets Data NFT once bounty launches. 10 Data NFTs to be dropped to random winners of top 100 Leaderboard.",
89+
finalizedDataNftIdentifier: "DATANFTFT-e936d4-0a",
8790
});
8891
allBounties.push({
8992
bountySubmitter: "erd1lgyz209038gh8l2zfxq68kzl9ljz0p22hv6l0ev8fydhx8s9cwasdtrua2",
@@ -154,6 +157,8 @@ export function getDataBounties() {
154157
Contributors ranked 21st to 50th will receive 1 copy each.
155158
Additionally, 5 lucky winners from the top 51 to 100 contributors will each receive 1 copy.
156159
50 copies donated to BiTz Monthly Leaderboard`,
160+
161+
finalized: true,
157162
});
158163
return allBounties;
159164
} else {
@@ -167,6 +172,7 @@ export function getDataBounties() {
167172
submittedOnTs: 1714138439,
168173
fillPerks:
169174
"The Creator of the bounty will receive 5 copies of the album.\n The top 5 contributors on the GiveBiTz leaderboard for this bounty will each receive 3 copies.\n Contributors ranked 6th to 20th will receive 2 copies each.\n Contributors ranked 21st to 50th will receive 1 copy each.\n Additionally, 5 lucky winners from the top 51 to 100 contributors will each receive 1 copy.\n 50 copies donated to BiTz Monthly Leaderboard",
175+
finalizedDataNftIdentifier: "DATANFTFT-e936d4-09",
170176
});
171177
allBounties.push({
172178
bountySubmitter: "erd1lgyz209038gh8l2zfxq68kzl9ljz0p22hv6l0ev8fydhx8s9cwasdtrua2",
@@ -177,6 +183,7 @@ export function getDataBounties() {
177183
submittedOnTs: 1714138439,
178184
fillPerks:
179185
"The Creator of the bounty will receive 5 copies of the album.\n The top 5 contributors on the GiveBiTz leaderboard for this bounty will each receive 3 copies.\n Contributors ranked 6th to 20th will receive 2 copies each.\n Contributors ranked 21st to 50th will receive 1 copy each.\n Additionally, 5 lucky winners from the top 51 to 100 contributors will each receive 1 copy.\n 50 copies donated to BiTz Monthly Leaderboard",
186+
finalizedDataNftIdentifier: "DATANFTFT-e936d4-0a",
180187
});
181188
allBounties.push({
182189
bountySubmitter: "erd108t4gdwdhwx2xhj5q0e6pujurk0kdyzxxh69987e873n83xumazshe0l3r",

0 commit comments

Comments
 (0)