-
-
Notifications
You must be signed in to change notification settings - Fork 830
Extract place call logic to its own file #11494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
Some minor comments on the code.
@@ -150,7 +126,7 @@ export default function RoomHeader({ room }: { room: Room }): JSX.Element { | |||
disabled={!!voiceCallDisabledReason} | |||
title={!voiceCallDisabledReason ? _t("Voice call") : voiceCallDisabledReason!} | |||
onClick={async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just spotted the async
here. The function is not async and it could be removed.
// component | ||
// break; | ||
} | ||
const makeCall = useCallback( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function can probably be removed and placeCall
can be called directly.
I can't see any value in it except that it raises the complexity here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🙂
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.