chore: better layer for reclusive comments.

This commit is contained in:
Yufan Sheng 2024-06-17 03:17:15 +08:00
parent 3d0036b242
commit 6131b97ec5
Signed by: syhily
GPG Key ID: DEB186763C308C31

View File

@ -49,19 +49,21 @@ const { comment, config, depth, pending } = Astro.props;
</div>
</article>
{
comment.children &&
(depth === 1 ? (
comment.children && depth === 1 && (
<ul class="children">
{comment.children.map((childComment) => (
<Astro.self comment={childComment} config={config} depth={depth + 1} />
))}
</ul>
) : (
)
}
</li>
{
comment.children && depth !== 1 && (
<>
{comment.children.map((childComment) => (
<Astro.self comment={childComment} config={config} depth={depth + 1} />
))}
</>
))
)
}
</li>