You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export default async function Page() {
try {
const response = await fetch('https://rsshub.app/api/radar/rules, {
next: { revalidate: 10 }, // Set revalidation interval if needed
});
if (!response.ok) {
throw new Error('Failed to fetch data');
}
const data = await response.json();
console.log(data); // You can log the fetched data
return (
<div>
<h1>Fetched Data</h1>
<pre>{JSON.stringify(data, null, 2)}</pre>
</div>
);
export default async function Page() {
try {
const response = await fetch('https://rsshub.app/api/radar/rules, {
next: { revalidate: 10 }, // Set revalidation interval if needed
});
} catch (error) {
console.error('Error fetching data:', error);
return
}
}
想知道怎么回事
The text was updated successfully, but these errors were encountered: