This commit is contained in:
Marshall Polaris 2022-08-12 15:27:59 -07:00
parent d29fe3f3d2
commit a85ec472b9
2 changed files with 4 additions and 6 deletions

View File

@ -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 (
<div key={i} className="border-b p-5">
<div key={start + i} className="border-b p-5">
<SiteLink
className="mb-2 block pb-2 font-medium text-indigo-700"
href={contractPath(contract)}

View File

@ -17,11 +17,9 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
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 }) {