Open Davison82 opened 1 year ago
@Davison82 Are you still facing the issue ?
Yes I'm still facing the issue even with the back ticks. The problem is the value={state.amountCollected} function won't show and I have created and donated to a campaign?
Raised of ${state.target}
} value={state.amountCollected} /> @Davison82 Are you still facing the issue ?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@Davison82
<div className="flex md:w-[150px] w-full flex-wrap justify-between gap-[30px]">
<CountBox title="Days left" value={remainingDays} />
<CountBox
title={`Raised of ${state.target}`}
value={state.amountCollected}
/>
<CountBox title="Total Backers" value={donators.length} />
</div>
</div>
This is working fine for me.
Suggest you to console log the state
and check what values are passed to the component.
const { state } = useLocation();
state should consist of key value like below :
{
"owner": "0x....",
"title": "The Power of One....",
"description": "Individuals can .....",
"target": "1.0",
"deadline": 1682812800000,
"amountCollected": "0.06",
"image": "https://cdn.......",
"pID": 0
}
*pID is my local change. So you should see either pId
or the name you gave for id.
Thank you for this. I ran console.log on the state, and "amountCollected" isn't being passed as "0.0", pID is 9. {
amountCollected: "0.0"
deadline: 1678579200000
description: "Create Crypto foodbank"
image: "https://cdn.britannica.com/77/170477-050-1C747EE3/Laptop-computer.jpg"
owner: "0x410993D09D2d67Bd259D98164973eC9BAb9cBb05"
pId: 9
target: "0.5"
title: "Foodbank"
}
Could this be because it's 0 in the createCampaign function in the Solidity file? campaign.owner = _owner; campaign.title = _title; campaign.description = _description; campaign.target = _target; campaign.deadline = _deadline; campaign.amountCollected = 0; campaign.image = _image; On Saturday, 8 April 2023 at 11:50:47 BST, Pradeep A @.***> wrote:
@Davison82
</div>
This is working fine for me. Suggest you to console log the state and check what values are passed to the component. const { state } = useLocation();
state should consist of key value like below : { "owner": "0x....", "title": "The Power of One....", "description": "Individuals can .....", "target": "1.0", "deadline": 1682812800000, "amountCollected": "0.06", "image": "https://cdn.......", "pID": 0 }
*pID is my local change. So you should see either pId or the name you gave for id.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@Davison82 @A-Pradeep @adrianhajdin @krishnaacharyaa Hello.
Does anyone has a solution to this?
@Davison82 @A-Pradeep @adrianhajdin @krishnaacharyaa Hello.
Does anyone has a solution to this?
what's the issue ?
campaign.amountCollected is showing 0 value. I have console.log and got this {
amountCollected: "0.0"
deadline: 1678579200000
description: "Create Crypto foodbank"
image: "https://cdn.britannica.com/77/170477-050-1C747EE3/Laptop-computer.jpg"
owner: "0x410993D09D2d67Bd259D98164973eC9BAb9cBb05"
pId: 9
target: "0.5"
title: "Foodbank"
}
On Saturday, 8 July 2023 at 11:22:29 BST, Pradeep A @.***> wrote:
@Davison82 @A-Pradeep @adrianhajdin @krishnaacharyaa Hello.
Does anyone has a solution to this?
what's the issue ?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@A-Pradeep The amountCollected isn't displaying in the Countbox.
Here
<CountBox
title={`Raised out of ${state.target}`}
value={state.amountCollected}
/>
This is what I get when I log state.
amountCollected: "0.0"
deadline: 1689724800000
description: "Embark on an epic dungeon-crawling adventure! Immerse yourself in our captivating, gamified stories featuring stunning miniatures and artwork, and 110+ unique quests, each offering truly diverse challenges that will keep you on the edge of your seat. The highly refined level-up system allows you to customize your hero and forge a path to glory. With an innovative skill system, you'll stay engaged even on other players' turns, ensuring non-stop strategies and combos."
image: "https://ksr-ugc.imgix.net/assets/041/090/860/94429932cd9629efbcce801f2e109ead_original.jpg?ixlib=rb-4.0.2&w=680&fit=max&v=1685125335&gif-q=50&q=92&s=ba780d5dee1b65972cd65903c8eed314"
owner: "0x13A19933267ec307c96f3dE8Ff8A2392C39263EB"
pId: 0
target: "1.0"
title: "Tanares Adventures Essential Gameplay"
I restarted the server and now everything works well. Weird.
Hi All
I'm having another issue with the uint256 amountCollected; sturct it's not showing up. The amount donated isn't displaying in the Countbox, code is in Campaign Details:
<CountBox title={
Raised of ${state.target}
} value={state.amountCollected} />Thanks