chore: better layer for reclusive comments.
This commit is contained in:
parent
e8c3937626
commit
a6e1585757
@ -49,19 +49,21 @@ const { comment, config, depth, pending } = Astro.props;
|
|||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{
|
{
|
||||||
comment.children &&
|
comment.children && depth === 1 && (
|
||||||
(depth === 1 ? (
|
<ul class="children">
|
||||||
<ul class="children">
|
{comment.children.map((childComment) => (
|
||||||
{comment.children.map((childComment) => (
|
<Astro.self comment={childComment} config={config} depth={depth + 1} />
|
||||||
<Astro.self comment={childComment} config={config} depth={depth + 1} />
|
))}
|
||||||
))}
|
</ul>
|
||||||
</ul>
|
)
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
{comment.children.map((childComment) => (
|
|
||||||
<Astro.self comment={childComment} config={config} depth={depth + 1} />
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
|
{
|
||||||
|
comment.children && depth !== 1 && (
|
||||||
|
<>
|
||||||
|
{comment.children.map((childComment) => (
|
||||||
|
<Astro.self comment={childComment} config={config} depth={depth + 1} />
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user