Skip to content

Commit

Permalink
Merge pull request #37 from Mouwf/fix/fix-html-structure
Browse files Browse the repository at this point in the history
無駄なdivを削除した。
  • Loading branch information
eigoninaritai-naokichi authored Jan 12, 2024
2 parents a9d5cea + e213916 commit ef0ebcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions app/routes/app._index/components/latest-post-time-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ export default function LatestPostTimeLine({
}) {
return (
<div>
{postContents.map((postContent, index) => {
{postContents.map((postContent) => {
return (
<div key={index}>
<PostDisplay postContent={postContent} />
</div>
<PostDisplay key={postContent.id} postContent={postContent} />
);
})}
</div>
Expand Down
10 changes: 4 additions & 6 deletions app/routes/components/post-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ export default function PostDisplay({
const reactionName = reactionNames[index];

return (
<div key={index}>
<fetcher.Form method="post" action="app/like">
<input type="hidden" name="reaction" value={reactionType} />
<button type="submit">{reactionName}</button>
</fetcher.Form>
</div>
<fetcher.Form key={index} method="post" action="app/like">
<input type="hidden" name="reaction" value={reactionType} />
<button type="submit">{reactionName}</button>
</fetcher.Form>
);
})}
</div>
Expand Down

0 comments on commit ef0ebcd

Please sign in to comment.