-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from L-Steinmacher/app-router
Migrate comments to app router
- Loading branch information
Showing
21 changed files
with
364 additions
and
791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { type CommentSelect } from '~/interfaces/comments'; | ||
import CommentCard from './commentCard'; | ||
|
||
export default function CommentList({ | ||
allComments, | ||
}: { | ||
allComments: CommentSelect[] | undefined; | ||
}) { | ||
|
||
return ( | ||
<div className="mt-16"> | ||
<h2 id="comments-heading" className="sr-only"> | ||
Comments | ||
</h2> | ||
{allComments ? ( | ||
allComments.map(comment => ( | ||
comment ? ( | ||
<CommentCard key={comment?.id} comment={comment} /> | ||
) : null | ||
) | ||
)) : ( | ||
<p className="text-center text-xl text-gray-500"> | ||
Be the first to leave your thoughts! | ||
</p> | ||
)} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.