import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Code, Database, TrendingUp, Gift, Award } from 'lucide-react'; interface Pallet { id: string; name: string; icon: React.ReactNode; description: string; image: string; extrinsics: string[]; storage: string[]; } const pallets: Pallet[] = [ { id: 'pez-treasury', name: 'PEZ Treasury', icon: , description: 'Manages token distribution with 48-month synthetic halving mechanism', image: 'https://d64gsuwffb70l.cloudfront.net/68ec477a0a2fa844d6f9df15_1760315321470_3d093f4f.webp', extrinsics: ['initialize_treasury', 'release_monthly_funds', 'force_genesis_distribution'], storage: ['HalvingInfo', 'MonthlyReleases', 'TreasuryStartBlock'] }, { id: 'trust', name: 'Trust Score', icon: , description: 'Calculates weighted trust scores from multiple components', image: 'https://d64gsuwffb70l.cloudfront.net/68ec477a0a2fa844d6f9df15_1760315323202_06631fb8.webp', extrinsics: ['force_recalculate_trust_score', 'update_all_trust_scores', 'periodic_trust_score_update'], storage: ['TrustScores', 'TotalActiveTrustScore', 'BatchUpdateInProgress'] }, { id: 'staking-score', name: 'Staking Score', icon: , description: 'Time-based staking multipliers from 1.0x to 2.0x over 12 months', image: 'https://d64gsuwffb70l.cloudfront.net/68ec477a0a2fa844d6f9df15_1760315324943_84216eda.webp', extrinsics: ['start_score_tracking'], storage: ['StakingStartBlock'] }, { id: 'pez-rewards', name: 'PEZ Rewards', icon: , description: 'Monthly epoch-based reward distribution system', image: 'https://d64gsuwffb70l.cloudfront.net/68ec477a0a2fa844d6f9df15_1760315326731_ca5f9a92.webp', extrinsics: ['initialize_rewards_system', 'record_trust_score', 'finalize_epoch', 'claim_reward'], storage: ['EpochInfo', 'EpochRewardPools', 'UserEpochScores', 'ClaimedRewards'] } ]; const PalletsGrid: React.FC = () => { const { t } = useTranslation(); const [selectedPallet, setSelectedPallet] = useState(null); return ( {t('palletsGrid.title')} {t('palletsGrid.description')} {pallets.map((pallet) => ( setSelectedPallet(pallet)} className="group relative bg-gray-900/50 backdrop-blur-sm rounded-xl border border-gray-800 hover:border-purple-500/50 transition-all cursor-pointer overflow-hidden" > {/* Background Glow */} {pallet.icon} {pallet.name} {pallet.description} {t('palletsGrid.extrinsics', { count: pallet.extrinsics.length })} {t('palletsGrid.storageItems', { count: pallet.storage.length })} ))} {/* Modal */} {selectedPallet && ( setSelectedPallet(null)} > e.stopPropagation()} > {selectedPallet.name} setSelectedPallet(null)} className="text-gray-400 hover:text-white" > ✕ {t('palletsGrid.extrinsicsTitle')} {selectedPallet.extrinsics.map((ext) => ( {ext}() ))} {t('palletsGrid.storageTitle')} {selectedPallet.storage.map((item) => ( {item} ))} )} ); }; export default PalletsGrid;
{t('palletsGrid.description')}
{pallet.description}
{ext}()
{item}