diff --git a/app/components/Chat/Message.tsx b/app/components/Chat/Message.tsx index bc6cbe2f6..f8aa6dae4 100644 --- a/app/components/Chat/Message.tsx +++ b/app/components/Chat/Message.tsx @@ -14,7 +14,10 @@ export function Message({ return (
  • -
    {data.sender.discordName}
    +
    + {/* TODO: */} + {data.sender.discordName ?? ""} +
    {userInfo && (
    {userInfo}
    )} diff --git a/app/components/Chat/index.tsx b/app/components/Chat/index.tsx index 99ac9209d..a2793cc7a 100644 --- a/app/components/Chat/index.tsx +++ b/app/components/Chat/index.tsx @@ -47,7 +47,8 @@ export function Chat({ content: sentMessage, sender: { id: user.id, - discordName: user.discordName, + // TODO: + discordName: user.discordName!, }, }} userInfo={userInfos[user.id]} diff --git a/app/routes/chat.ts b/app/routes/chat.ts index 3e17a9c15..97e0f4ed4 100644 --- a/app/routes/chat.ts +++ b/app/routes/chat.ts @@ -39,7 +39,9 @@ export const action: ActionFunction = async ({ request, context }) => { roomId: messageFromDb.roomId, sender: { id: user.id, - discordName: user.discordName, + // TODO: fix + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + discordName: user.discordName!, }, }; diff --git a/app/utils/schemas.ts b/app/utils/schemas.ts index c525f72d3..31bf31056 100644 --- a/app/utils/schemas.ts +++ b/app/utils/schemas.ts @@ -27,7 +27,8 @@ export const LoggedInUserSchema = z id: z.string(), discordId: z.string(), discordAvatar: z.string().nullable(), - discordName: z.string(), + // TODO: fix + discordName: z.string().nullish(), }) .nullish(), })