mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fix typecheck error
This commit is contained in:
parent
ba0604ab9d
commit
032a246963
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ interface Props {
|
||||||
order: 'ASC' | 'DESC';
|
order: 'ASC' | 'DESC';
|
||||||
}
|
}
|
||||||
|
|
||||||
const isFirstGroupWithNewCommentt = (
|
const isFirstGroupWithNewComment = (
|
||||||
group: ICommentGroup,
|
group: ICommentGroup,
|
||||||
prevGroup: ICommentGroup | undefined,
|
prevGroup: ICommentGroup | undefined,
|
||||||
) => group.hasNew && (!prevGroup || !prevGroup.hasNew);
|
) => group.hasNew && (!prevGroup || !prevGroup.hasNew);
|
||||||
|
@ -88,7 +88,7 @@ const NodeComments: FC<Props> = observer(({ order }) => {
|
||||||
|
|
||||||
{groupped.map((group, index) => (
|
{groupped.map((group, index) => (
|
||||||
<>
|
<>
|
||||||
{isFirstGroupWithNewCommentt(group, groupped.at(index - 1)) && (
|
{isFirstGroupWithNewComment(group, groupped[index - 1]) && (
|
||||||
<a
|
<a
|
||||||
id={NEW_COMMENT_ANCHOR_NAME}
|
id={NEW_COMMENT_ANCHOR_NAME}
|
||||||
className={styles.newCommentAnchor}
|
className={styles.newCommentAnchor}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue