From 1125ebf29a57109e8f1c5770d89d7051c24ebc6b Mon Sep 17 00:00:00 2001 From: Marc Platt Date: Wed, 14 May 2025 15:42:18 -0400 Subject: [PATCH] update bottom left chain count for l1 --- src/components/QuoteWidget.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/QuoteWidget.js b/src/components/QuoteWidget.js index 961e6d1..9b28616 100644 --- a/src/components/QuoteWidget.js +++ b/src/components/QuoteWidget.js @@ -9,13 +9,19 @@ const QuoteWidget = () => { const chains = useSelector(state => state.chains); const [currentQuoteIndex, setCurrentQuoteIndex] = useState(0); - const downloadedCount = chains.filter(chain => + // Count only visible chain rows (exclude bitcoin and enforcer as they don't render as cards) + const visibleChains = chains.filter(chain => chain.id !== 'bitcoin' && chain.id !== 'enforcer' && chain.released !== "no"); + + // Count downloaded chains (only those that appear as visible cards) + const downloadedCount = visibleChains.filter(chain => chain.status !== 'not_downloaded' && chain.status !== 'downloading' && - chain.status !== 'extracting' && - chain.released !== "no" + chain.status !== 'extracting' ).length; - const totalAvailable = chains.filter(chain => chain.released !== "no").length; + + // Total visible chains (rows) count + const totalAvailable = visibleChains.length; + const goToNextQuote = () => { setCurrentQuoteIndex((prevIndex) => (prevIndex + 1) % quotes.length); };