Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created March 9, 2022 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/53831fc35701e4660a150b832442dc82 to your computer and use it in GitHub Desktop.
Save velotiotech/53831fc35701e4660a150b832442dc82 to your computer and use it in GitHub Desktop.
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