Download next.js/examples/cms-contentful/app/avatar.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 507 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-contentful/app/avatar.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-contentful/app/avatar.tsx
-
curl -L -o avatar.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-contentful/app/avatar.tsx
507 Bytes
| import ContentfulImage from "@/lib/contentful-image"; | |
| export default function Avatar({ | |
| name, | |
| picture, | |
| }: { | |
| name: string; | |
| picture: any; | |
| }) { | |
| return ( | |
| <div className="flex items-center"> | |
| <div className="mr-4 w-12 h-12"> | |
| <ContentfulImage | |
| alt={name} | |
| className="object-cover h-full rounded-full" | |
| height={48} | |
| width={48} | |
| src={picture.url} | |
| /> | |
| </div> | |
| <div className="text-xl font-bold">{name}</div> | |
| </div> | |
| ); | |
| } | |