fix: repair broken catalog images and seed full crop catalog + payment ledger - #1
Open
leandrogavidia wants to merge 1 commit into
Open
fix: repair broken catalog images and seed full crop catalog + payment ledger#1leandrogavidia wants to merge 1 commit into
leandrogavidia wants to merge 1 commit into
Conversation
- Implemented a fallback image for broken image URLs in App component. - Added handleImageError function to replace broken images with a fallback. - Updated presetCrops with new crop entries including Papaya, Prontoalivio, and others. - Introduced presetTransactions to provide initial transaction data for Solana Pay demo.
|
@leandrogavidia is attempting to deploy a commit to the jjslcripto's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Body:
The deployed inventory ("Mi Inventario de Cultivos") showed a broken image
and an incorrect one. Root cause: both preset crops in
presetCrops.tspointed at bad Unsplash URLs.
Lechuga Romana → its Unsplash photo returned HTTP 404 → broken-image icon.
Albahaca Genovesa → loaded, but the photo was actually bananas (wrong content).
Lechuga Romana → its Unsplash photo returned HTTP 404 → broken-image icon.
Albahaca Genovesa → loaded, but the photo was actually bananas (wrong content).
This PR fixes the images, replaces the 2 placeholder crops with the real
catalog, hardens image loading against future dead links, and seeds the
Solana payment ledger with default records.
Changes
Crop catalog (
src/presetCrops.ts)Aguacate (Palta), Yuca, Plátano Bizcochito, Bananito, Café, Toronjil, Yuca,
Tomate, Caña de azúcar.
sunlight/water/harvest info, prices and stock.
Every image was downloaded and visually verified for correct content.
Resilient image loading (
src/App.tsx)onErrorfallback to all crop<img>tags. If any external imageever fails, it degrades to an inline SVG placeholder instead of a broken icon.
Solana Ledger (
src/presetTransactions.ts)Café x1 = 4.59 USDC), wired as the default state when no transactions are
saved (mirrors the crop-preset pattern).
Notes / follow-ups
localStorage(
solana_huerto_crops,solana_huerto_txs) first and only fall back to thepresets when empty. Returning browsers must clear those keys to see the new
data; fresh/incognito sessions see it immediately.
editable in-app.
screenshots and still needs to be added.