File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export default function Chat(props: Readonly<HTMLAttributes<HTMLDivElement>>) {
57
57
) }
58
58
ref = { ref }
59
59
>
60
- { messages [ currentRoom . ID ] . map ( ( message , index , arr ) => (
60
+ { messages [ currentRoom . ID ] ? messages [ currentRoom . ID ] . map ( ( message , index , arr ) => (
61
61
< ErrorBoundary
62
62
key = { index }
63
63
fallbackRender = { ( { error : e } ) => {
@@ -75,7 +75,7 @@ export default function Chat(props: Readonly<HTMLAttributes<HTMLDivElement>>) {
75
75
prev = { arr [ index - 1 ] }
76
76
/>
77
77
</ ErrorBoundary >
78
- ) ) }
78
+ ) ) : null }
79
79
< div className = "relative h-0 w-0" >
80
80
{ /* invisible div to scroll to */ }
81
81
< div
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ export default function TrainerCard(
111
111
src = { user . avatar ?
112
112
Sprites . getAvatar ( user . avatar ) :
113
113
Sprites . getAvatar ( 167 ) }
114
+ alt = "avatar"
114
115
className = "w-20 h-20"
115
116
/>
116
117
) :
@@ -146,13 +147,13 @@ function UserCardButton({
146
147
icon,
147
148
onClick,
148
149
disabled = false ,
149
- } : {
150
+ } : Readonly < {
150
151
name : string ;
151
152
alt : string ;
152
153
icon : ReactNode ;
153
154
onClick : MouseEventHandler < HTMLButtonElement > ;
154
155
disabled ?: boolean ;
155
- } ) {
156
+ } > ) {
156
157
return (
157
158
< button
158
159
className = { 'text-sm rounded-lg px-4 py-2 flex-grow-0 border border-gray-700 flex flex-col justify-center items-center ' +
You can’t perform that action at this time.
0 commit comments