Files
vercel__next.js/examples/cms-drupal/components/more-stories.js
Steven 4466ba436b chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00

33 lines
948 B
JavaScript

import { absoluteURL } from "../lib/api";
import PostPreview from "./post-preview";
export default function MoreStories({ posts }) {
return (
<section>
<h2 className="mb-8 text-6xl md:text-7xl font-bold tracking-tighter leading-tight">
More Stories
</h2>
<div className="grid grid-cols-1 md:grid-cols-2 md:gap-16 lg:gap-32 gap-20 md:gap-32 mb-32">
{posts.map((node) => (
<PostPreview
key={node.id}
title={node.title}
coverImage={{
sourceUrl: absoluteURL(node.field_image.uri.url),
}}
date={node.created}
author={{
name: node.uid.field_name,
avatar: {
url: absoluteURL(node.uid.user_picture.uri.url),
},
}}
slug={node.path.alias}
excerpt={node.body.summary}
/>
))}
</div>
</section>
);
}