Footer enhancements and performance optimizations #9
1 changed files with 6 additions and 2 deletions
|
@ -80,8 +80,12 @@ export default function Home() {
|
|||
activeRes.json()
|
||||
]);
|
||||
|
||||
setStreams(streamsData);
|
||||
setActiveSources(activeData);
|
||||
// Handle both old and new API response formats
|
||||
const streams = streamsData.success ? streamsData.data : streamsData;
|
||||
const activeSources = activeData.success ? activeData.data : activeData;
|
||||
|
||||
setStreams(streams);
|
||||
setActiveSources(activeSources);
|
||||
} catch (error) {
|
||||
console.error('Error fetching data:', error);
|
||||
showError('Failed to Load Data', 'Could not fetch streams. Please refresh the page.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue