Download next.js/examples/blog-starter/src/app/page.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 807 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/blog-starter/src/app/page.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/blog-starter/src/app/page.tsx
-
curl -L -o page.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/blog-starter/src/app/page.tsx
807 Bytes
| import Container from "@/app/_components/container"; | |
| import { HeroPost } from "@/app/_components/hero-post"; | |
| import { Intro } from "@/app/_components/intro"; | |
| import { MoreStories } from "@/app/_components/more-stories"; | |
| import { getAllPosts } from "@/lib/api"; | |
| export default function Index() { | |
| const allPosts = getAllPosts(); | |
| const heroPost = allPosts[0]; | |
| const morePosts = allPosts.slice(1); | |
| return ( | |
| <main> | |
| <Container> | |
| <Intro /> | |
| <HeroPost | |
| title={heroPost.title} | |
| coverImage={heroPost.coverImage} | |
| date={heroPost.date} | |
| author={heroPost.author} | |
| slug={heroPost.slug} | |
| excerpt={heroPost.excerpt} | |
| /> | |
| {morePosts.length > 0 && <MoreStories posts={morePosts} />} | |
| </Container> | |
| </main> | |
| ); | |
| } | |