diff --git a/web/components/comments-list.tsx b/web/components/comments-list.tsx index 0790b9c7..90542d4b 100644 --- a/web/components/comments-list.tsx +++ b/web/components/comments-list.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { Dictionary, groupBy, keyBy, mapValues, uniq } from 'lodash' +import { Dictionary, keyBy, uniq } from 'lodash' import { Comment } from 'common/comment' import { Contract } from 'common/contract' @@ -59,7 +59,7 @@ export function UserCommentsList(props: { user: User }) { {pageComments.map(({ key, items }, i) => { const contract = contracts[key] return ( -
+
{ const creds = await authenticateOnServer(ctx) const [auth, user] = (await Promise.all([ creds != null ? getUserAndPrivateUser(creds.user.uid) : null, - getUserByUsername(ctx.params!.username as string), + getUserByUsername(ctx.params!.username as string), // eslint-disable-line @typescript-eslint/no-non-null-assertion ])) as [UserAndPrivateUser | null, User | null] - return { - props: { auth, user }, - } + return { props: { auth, user } } } export default function UserProfile(props: { user: User | null }) {