My personal site. theclashfruit.me
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: disable comments for now

+26 -22
+1 -1
app/(main)/links/page.tsx
··· 116 116 <p>Check out these cool people!</p> 117 117 <p> 118 118 Want your own button here? Hit me up on{' '} 119 - <code>admin [at] theclashfruit.me</code>. 119 + <Link href="mailto:admin@theclashfruit.me">admin@theclashfruit.me</Link>. 120 120 </p> 121 121 </> 122 122 );
+25 -21
app/(main)/post/[slug]/page.tsx
··· 53 53 }) { 54 54 const { slug } = await params; 55 55 const { posts: post } = await fetchPostData(slug); 56 - const comments = await fetchComments(post.id); 56 + 57 + const commentsEnabled = false; 58 + const comments = commentsEnabled ? await fetchComments(post.id) : []; 57 59 58 60 return ( 59 61 <> ··· 67 69 /> 68 70 </article> 69 71 70 - <div> 71 - <h2>Comments</h2> 72 + {commentsEnabled && ( 73 + <div> 74 + <h2>Comments</h2> 72 75 73 - <CommentForm post={post.id} /> 76 + <CommentForm post={post.id} /> 74 77 75 - <hr 76 - style={{ 77 - border: 'none', 78 - borderBottom: '1px solid var(--outlineVariant)', 79 - margin: '16px 8px' 80 - }} 81 - /> 78 + <hr 79 + style={{ 80 + border: 'none', 81 + borderBottom: '1px solid var(--outlineVariant)', 82 + margin: '16px 8px' 83 + }} 84 + /> 82 85 83 - {comments && 84 - comments.map((c) => ( 85 - <Comment 86 - key={c.id} 87 - comment={c} 88 - author={post.author!} 89 - isRoot={true} 90 - /> 91 - ))} 92 - </div> 86 + {comments && 87 + comments.map((c) => ( 88 + <Comment 89 + key={c.id} 90 + comment={c} 91 + author={post.author!} 92 + isRoot={true} 93 + /> 94 + ))} 95 + </div> 96 + )} 93 97 </> 94 98 ); 95 99 }