mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
Update GlobalMapScreen and usePlayerGame logic for improved cache claiming feedback
This commit is contained in:
1 parent
bb7e46cf4b
commit
ac7d89c0c5
2 files changed
+7
-5
No files matched your search
@@ -132,14 +132,12 @@ const GlobalMapScreen = ({ navigation, route }) => {
|
||||
setIsClaiming(false);
|
||||
|
||||
if (result) {
|
||||
const points = Number(claimedCache?.CachePoints ?? 0);
|
||||
const points = Number(claimedCache?.CachePoints ?? 10);
|
||||
const cacheName = claimedCache?.CacheName || "Cache";
|
||||
setFoundCacheIds((prev) =>
|
||||
prev.includes(cacheId) ? prev : [...prev, cacheId],
|
||||
);
|
||||
setClaimedPopupMessage(
|
||||
`${cacheName} claimed! You received ${points} points.`,
|
||||
);
|
||||
setClaimedPopupMessage(`${cacheName} claimed! You gained +${points} points.`);
|
||||
setClaimedPopupVisible(true);
|
||||
setTimeout(() => setClaimedPopupVisible(false), 3000);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user