FKXXRDR4KMJC5AJ7453GMNMPXZ5ANS3V3OXEK5NXNRUTP2B7IGLAC
BDMXIXECYJQDF66EF2TSVVHWIJ5CC22LUFOAOO2Y6YTZZPI3GOYQC
AKJYQ7DS4ZQBUVXA4QOKL46X6MOZI4HK5HSDT6JZWDZHQ6UMPXFAC
DPJCZOPIKAKQIS4YRXETBSJA5ZTL2KQESSJE2TEZFLRQARXUVFXQC
PZNEDCRDS5IBR7QDPHTW5HZRMQAZFIF7VB3IKWPZDC7IALHZKHWAC
(playerResourceAmounts?.[activeQuest.resourceType] || 0) >= activeQuest.resourceAmount;
(playerResourceAmounts?.[activeQuest.resourceType] || 0) >=
activeQuest.resourceAmount;
console.log({ score, lastScore, questScore }); console.log("updating score");
console.log({ score, lastScore, questScore });
console.log("updating score");
// console.log({ score, lastScore, questScore }); // console.log("updating score");
// console.log({ score, lastScore, questScore });
// console.log("updating score");
{<Score score={score} scoreDetails={scoreDetails} />}
{<Score scoreDetails={scoreDetails} />}
score,
score: number; scoreDetails: QuestScoreDetails;
score: number;
scoreDetails: QuestScoreDetails;
scoreDetails: QuestScoreDetails | undefined;
const [viewed, setViewed] = useState(true);
const [didAcceptRewards, setDidAcceptRewards] = useState(true);
console.log({ scoreDetails }); if (scoreDetails.total === 0) return; setViewed(false);
console.log({ scoreDetails });
if (scoreDetails.total === 0) return;
setViewed(false);
// console.log({ scoreDetails }); if (!scoreDetails || scoreDetails.total === 0) return; setDidAcceptRewards(false);
// console.log({ scoreDetails });
if (!scoreDetails || scoreDetails.total === 0) return;
setDidAcceptRewards(false);
{!viewed && (
{!didAcceptRewards && (
<h3>Score: {score}</h3> {!!scoreDetails.total && ( <h4>Your score increased by {scoreDetails.total}!</h4>
<h3>Score: {score}</h3>
{!!scoreDetails.total && (
<h4>Your score increased by {scoreDetails.total}!</h4>
<h3>Quest Rewards</h3> {!!(scoreDetails?.total) && ( <> +{scoreDetails?.total} to your score! </>
<h3>Quest Rewards</h3>
{!!(scoreDetails?.total) && (
<> +{scoreDetails?.total} to your score! </>
{scoreDetails.scoreComponents.map((scoreComponent) => {
<br></br> {scoreDetails?.scoreComponents.map((scoreComponent) => {
<br></br>
{scoreDetails?.scoreComponents.map((scoreComponent) => {
<h5>
<br></br> <div>
<div>
</h5> </React.Fragment>
</h5>
</React.Fragment>
</div> </React.Fragment>
</div>
<button onClick={() => setViewed(true)}>OK</button>
<br></br> <button onClick={() => setDidAcceptRewards(true)}>Claim rewards!</button>
<button onClick={() => setDidAcceptRewards(true)}>Claim rewards!</button>