mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
add eslint-plugin-prettier
This commit is contained in:
parent
0e4d2bf44d
commit
ba0604ab9d
69 changed files with 419 additions and 249 deletions
|
@ -6,13 +6,13 @@ import { groupCommentsByUser } from '~/utils/fn';
|
|||
export const useGrouppedComments = (
|
||||
comments: IComment[],
|
||||
order: 'ASC' | 'DESC',
|
||||
lastSeen?: string
|
||||
lastSeen?: string,
|
||||
) =>
|
||||
useMemo(
|
||||
() =>
|
||||
(order === 'DESC' ? [...comments].reverse() : comments).reduce(
|
||||
groupCommentsByUser(lastSeen),
|
||||
[]
|
||||
[],
|
||||
),
|
||||
[comments, lastSeen, order]
|
||||
[comments, lastSeen, order],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue