Skip to content

Commit 57826d4

Browse files
style: fix Prettier formatting in react package
1 parent 94c1c30 commit 57826d4

5 files changed

Lines changed: 35 additions & 9 deletions

File tree

packages/e2e-react/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ dist-ssr
2626
/playwright-report/
2727
/blob-report/
2828
/playwright/.cache/
29+
/tests/.auth/

packages/react/src/views/ChatBody/ChatBody.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ const ChatBody = ({
159159
RCInstance.removeActionTriggeredListener(onActionTriggerResponse);
160160
RCInstance.removeUiInteractionListener(onActionTriggerResponse);
161161
};
162-
}, [RCInstance, isUserAuthenticated, addMessage, removeMessage, onActionTriggerResponse]);
162+
}, [
163+
RCInstance,
164+
isUserAuthenticated,
165+
addMessage,
166+
removeMessage,
167+
onActionTriggerResponse,
168+
]);
163169

164170
useEffect(() => {
165171
if (isUserAuthenticated) {

packages/react/src/views/ChatHeader/ChatHeader.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,12 @@ const ChatHeader = ({
436436
</Box>
437437
<Box css={styles.chatHeaderIconRow}>
438438
{avatarUrl && (
439-
<img width="20px" height="20px" src={avatarUrl || null} alt="avatar" />
439+
<img
440+
width="20px"
441+
height="20px"
442+
src={avatarUrl || null}
443+
alt="avatar"
444+
/>
440445
)}
441446

442447
{surfaceOptions.length > 0 && (

packages/react/src/views/ChatInput/ChatInput.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ const ChatInput = ({ scrollToBottom, clearUnreadDividerRef }) => {
169169
.catch(console.error);
170170

171171
RCInstance.getChannelMembers(isChannelPrivate)
172-
.then((channelMembers) =>
173-
setMembersHandler(channelMembers.members || [])
174-
)
172+
.then((channelMembers) => setMembersHandler(channelMembers.members || []))
175173
.catch(console.error);
176174
}, [RCInstance, isUserAuthenticated, isChannelPrivate, setMembersHandler]);
177175

@@ -718,7 +716,11 @@ const ChatInput = ({ scrollToBottom, clearUnreadDividerRef }) => {
718716
/>
719717
) : null
720718
) : (
721-
<Button onClick={() => onJoin()} type="primary" disabled={isLoginIn}>
719+
<Button
720+
onClick={() => onJoin()}
721+
type="primary"
722+
disabled={isLoginIn}
723+
>
722724
{isLoginIn ? <Throbber /> : 'JOIN'}
723725
</Button>
724726
)}

packages/react/src/views/Message/MessageToolbox.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ export const MessageToolbox = ({
306306
message.file.type.startsWith('image/') ? (
307307
<div>
308308
<img
309-
src={message.file?._id ? `${instanceHost}/file-upload/${message.file._id}/${message.file.name}` : null}
309+
src={
310+
message.file?._id
311+
? `${instanceHost}/file-upload/${message.file._id}/${message.file.name}`
312+
: null
313+
}
310314
alt={message.file.name}
311315
style={{ maxWidth: '100px', maxHeight: '100px' }}
312316
/>
@@ -320,15 +324,23 @@ export const MessageToolbox = ({
320324
style={{ maxWidth: '100%', maxHeight: '200px' }}
321325
>
322326
<source
323-
src={message.file?._id ? `${instanceHost}/file-upload/${message.file._id}/${message.file.name}` : null}
327+
src={
328+
message.file?._id
329+
? `${instanceHost}/file-upload/${message.file._id}/${message.file.name}`
330+
: null
331+
}
324332
type={message.file.type}
325333
/>
326334
Your browser does not support the video tag.
327335
</video>
328336
) : message.file.type.startsWith('audio/') ? (
329337
<audio controls style={{ maxWidth: '100%' }}>
330338
<source
331-
src={message.file?._id ? `${instanceHost}/file-upload/${message.file._id}/${message.file.name}` : null}
339+
src={
340+
message.file?._id
341+
? `${instanceHost}/file-upload/${message.file._id}/${message.file.name}`
342+
: null
343+
}
332344
type={message.file.type}
333345
/>
334346
Your browser does not support the audio element.

0 commit comments

Comments
 (0)