Loading problem…
Build a Data Fetching Dashboard in React that loads metrics from a mock API, shows shimmer placeholders while loading, and retries with exponential backoff on failures.
delay = baseDelay * 2^attemptinterface DashboardData {
summary: {
label: string;
value: string;
delta: string;
}[];
activity: {
id: string;
title: string;
time: string;
}[];
lastUpdated: string;
}{
summary: [
{ label: 'Revenue', value: '$84.2k', delta: '+12%' },
{ label: 'Active Users', value: '3,412', delta: '+4%' }
],
activity: [
{ id: '1', title: 'Invoice #4821 paid', time: '2m ago' }
],
lastUpdated: '2024-06-04T12:05:00Z'
}