Resolved card loading issue on MAM Board.
This commit is contained in:
parent
5630f80a54
commit
b2dde1ea56
@ -209,18 +209,26 @@ const loadMinterBoardPage = async () => {
|
|||||||
await loadCards(minterCardIdentifierPrefix)
|
await loadCards(minterCardIdentifierPrefix)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// Initialize Cached Minter Group and Minter Admins
|
//Initialize Minter Group and Admin Group
|
||||||
const [minterGroup, minterAdmins] = await Promise.all([
|
await initializeCachedGroups()
|
||||||
fetchMinterGroupMembers(),
|
|
||||||
fetchMinterGroupAdmins()
|
|
||||||
])
|
|
||||||
cachedMinterAdmins = minterAdmins
|
|
||||||
cachedMinterGroup = minterGroup
|
|
||||||
|
|
||||||
await featureTriggerCheck()
|
await featureTriggerCheck()
|
||||||
await loadCards(minterCardIdentifierPrefix)
|
await loadCards(minterCardIdentifierPrefix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const initializeCachedGroups = async () => {
|
||||||
|
try {
|
||||||
|
const [minterGroup, minterAdmins] = await Promise.all([
|
||||||
|
fetchMinterGroupMembers(),
|
||||||
|
fetchMinterGroupAdmins()
|
||||||
|
])
|
||||||
|
cachedMinterGroup = minterGroup
|
||||||
|
cachedMinterAdmins = minterAdmins
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error initializing cached groups:", error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const runWithConcurrency = async (tasks, concurrency = 5) => {
|
const runWithConcurrency = async (tasks, concurrency = 5) => {
|
||||||
const results = []
|
const results = []
|
||||||
@ -453,6 +461,9 @@ const processARBoardCards = async (allValidCards) => {
|
|||||||
|
|
||||||
//Main function to load the Minter Cards ----------------------------------------
|
//Main function to load the Minter Cards ----------------------------------------
|
||||||
const loadCards = async (cardIdentifierPrefix) => {
|
const loadCards = async (cardIdentifierPrefix) => {
|
||||||
|
if ((!cachedMinterGroup || cachedMinterGroup.length === 0) || (!cachedMinterAdmins || cachedMinterAdmins.length === 0)) {
|
||||||
|
await initializeCachedGroups()
|
||||||
|
}
|
||||||
const cardsContainer = document.getElementById("cards-container")
|
const cardsContainer = document.getElementById("cards-container")
|
||||||
cardsContainer.innerHTML = "<p>Loading cards...</p>"
|
cardsContainer.innerHTML = "<p>Loading cards...</p>"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const Q_MINTERSHIP_VERSION = "1.06.6"
|
const Q_MINTERSHIP_VERSION = "1.21"
|
||||||
|
|
||||||
const messageIdentifierPrefix = `mintership-forum-message`
|
const messageIdentifierPrefix = `mintership-forum-message`
|
||||||
const messageAttachmentIdentifierPrefix = `mintership-forum-attachment`
|
const messageAttachmentIdentifierPrefix = `mintership-forum-attachment`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user