Skip to content

Commit 6a730cd

Browse files
committed
fix build error
1 parent be0cebb commit 6a730cd

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/pages/guestbook/index.astro

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ interface Comment {
2626
const title = 'Guestbook';
2727
const description = 'A collection of all comments, styled like VS Code.';
2828
29-
// Sort comments by date and take the most recent 100
30-
const sortedComments = comments.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
31-
const displayedComments = sortedComments.slice(0, 100);
32-
33-
const discussionsUrl = `https://github.com/${siteConfig.integ.giscus.repo}/discussions`;
29+
const discussionsUrl = `https://github.com/${siteConfig.integ.giscus?.repo}/discussions`;
3430
3531
// Helper function to format time ago
3632
function timeAgo(dateString: string | number | Date) {
@@ -370,7 +366,7 @@ function getReactionEmoji(reaction: string) {
370366
</div>
371367
<div class="comments-list">
372368
{
373-
displayedComments.map((comment: Comment, index: number) => (
369+
comments.map((comment: Comment, index: number) => (
374370
<div class="comment-item">
375371
<div class="line-number">{comments.length - index}</div>
376372
<div class="comment-content-wrapper">
@@ -418,6 +414,7 @@ function getReactionEmoji(reaction: string) {
418414
<!-- Right Pane: Giscus -->
419415
<div class="giscus-pane">
420416
<script
417+
is:inline
421418
src="https://giscus.app/client.js"
422419
data-repo="CatCodeMe/catcodeme.github.io"
423420
data-repo-id="R_kgDOLTuIuQ"

0 commit comments

Comments
 (0)