mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-27 05:47:55 +00:00
Standardize loading states across all components
Replaced custom loading spinners with standardized LoadingState component from AsyncComponent.tsx. This ensures consistent UX for all data-loading operations. Changes: - web/src/components/staking/StakingDashboard.tsx: LoadingState for staking data - web/src/components/governance/GovernanceOverview.tsx: LoadingState for governance data - web/src/components/governance/ProposalsList.tsx: LoadingState for proposals - web/src/components/dex/PoolBrowser.tsx: LoadingState for liquidity pools - web/src/components/delegation/DelegationManager.tsx: LoadingState for delegation data - web/src/components/forum/ForumOverview.tsx: LoadingState for forum threads - web/src/components/treasury/TreasuryOverview.tsx: LoadingState for treasury data All components now show: - Kurdistan green animated spinner (Loader2) - Contextual loading messages - Consistent padding and centering - Professional appearance Button loading states (auth, wallet modals) left as-is since they appropriately disable during actions.
This commit is contained in:
@@ -9,6 +9,7 @@ import { Badge } from '../ui/badge';
|
||||
import { Progress } from '../ui/progress';
|
||||
import { usePolkadot } from '../../contexts/PolkadotContext';
|
||||
import { formatBalance } from '@pezkuwi/lib/wallet';
|
||||
import { LoadingState } from '@pezkuwi/components/AsyncComponent';
|
||||
|
||||
interface GovernanceStats {
|
||||
activeProposals: number;
|
||||
@@ -123,6 +124,10 @@ const GovernanceOverview: React.FC = () => {
|
||||
}
|
||||
};
|
||||
|
||||
if (loading) {
|
||||
return <LoadingState message="Loading governance data..." />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{/* Stats Grid */}
|
||||
|
||||
Reference in New Issue
Block a user