mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-19 06:20:25 +00:00
Hide back & hangup buttons when ?embed query param is passed
This commit is contained in:
@@ -80,6 +80,14 @@ export function RoomHeaderInfo({ roomName, avatarUrl }) {
|
||||
export function RoomSetupHeaderInfo({ roomName, avatarUrl, ...rest }) {
|
||||
const ref = useRef();
|
||||
const { buttonProps } = useButton(rest, ref);
|
||||
const isEmbedded = window.location.search.includes("embed");
|
||||
if (isEmbedded) {
|
||||
return (
|
||||
<div className={styles.backButton} ref={ref} {...buttonProps}>
|
||||
<RoomHeaderInfo roomName={roomName} avatarUrl={avatarUrl} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<button className={styles.backButton} ref={ref} {...buttonProps}>
|
||||
<ArrowLeftIcon width={16} height={16} />
|
||||
|
||||
@@ -158,6 +158,7 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
? activeSpeakerUser.displayName
|
||||
: "";
|
||||
|
||||
const isEmbedded = window.location.search.includes("embed");
|
||||
return (
|
||||
<div className={styles.pttCallView} ref={containerRef}>
|
||||
<PTTClips
|
||||
@@ -206,7 +207,7 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
feedbackModalState={feedbackModalState}
|
||||
feedbackModalProps={feedbackModalProps}
|
||||
/>
|
||||
<HangupButton onPress={onLeave} />
|
||||
{!isEmbedded && <HangupButton onPress={onLeave} />}
|
||||
<InviteButton onPress={() => inviteModalState.open()} />
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user