text-background-color-source #10
1 changed files with 3 additions and 1 deletions
|
@ -80,7 +80,9 @@ export default function Home() {
|
||||||
activeRes.json()
|
activeRes.json()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
setStreams(streamsData);
|
// Handle both old and new API response formats
|
||||||
|
const streams = streamsData.success ? streamsData.data : streamsData;
|
||||||
|
setStreams(streams);
|
||||||
setActiveSources(activeData);
|
setActiveSources(activeData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue