Created
March 9, 2022 06:27
-
-
Save velotiotech/53831fc35701e4660a150b832442dc82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function NewsWithData() { | |
const storyIds = await fetchData('storyIds'); | |
return ( | |
<> | |
{storyIds.slice(0, 30).map((id) => { | |
return ( | |
<Suspense fallback={<Spinner />}> | |
<StoryWithData id={id} /> | |
</Suspense> | |
); | |
})} | |
</> | |
); | |
} | |
export default function News() { | |
return ( | |
<Page> | |
<Suspense fallback={<Spinner />}> | |
<NewsWithData /> | |
</Suspense> | |
<Footer /> | |
</Page> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment