Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -24,18 +24,15 @@ interface Props {
grey?: boolean;
}
export const LiveBadge: React.FC<Props> = ({
grey = false,
}) => {
const liveBadgeClasses = classNames(
"mx_LiveBadge",
{
"mx_LiveBadge--grey": grey,
},
);
export const LiveBadge: React.FC<Props> = ({ grey = false }) => {
const liveBadgeClasses = classNames("mx_LiveBadge", {
"mx_LiveBadge--grey": grey,
});
return <div className={liveBadgeClasses}>
<LiveIcon className="mx_Icon mx_Icon_16" />
{ _t("Live") }
</div>;
return (
<div className={liveBadgeClasses}>
<LiveIcon className="mx_Icon mx_Icon_16" />
{_t("Live")}
</div>
);
};

View file

@ -24,16 +24,10 @@ interface Props {
onClick: () => void;
}
export const SeekButton: React.FC<Props> = ({
onClick,
icon: Icon,
label,
}) => {
return <AccessibleButton
kind="secondary_content"
onClick={onClick}
aria-label={label}
>
<Icon className="mx_Icon mx_Icon_24" />
</AccessibleButton>;
export const SeekButton: React.FC<Props> = ({ onClick, icon: Icon, label }) => {
return (
<AccessibleButton kind="secondary_content" onClick={onClick} aria-label={label}>
<Icon className="mx_Icon mx_Icon_24" />
</AccessibleButton>
);
};

View file

@ -26,17 +26,14 @@ interface Props {
onClick: () => void;
}
export const VoiceBroadcastControl: React.FC<Props> = ({
className = "",
icon: Icon,
label,
onClick,
}) => {
return <AccessibleButton
className={classNames("mx_VoiceBroadcastControl", className)}
onClick={onClick}
aria-label={label}
>
<Icon className="mx_Icon mx_Icon_16" />
</AccessibleButton>;
export const VoiceBroadcastControl: React.FC<Props> = ({ className = "", icon: Icon, label, onClick }) => {
return (
<AccessibleButton
className={classNames("mx_VoiceBroadcastControl", className)}
onClick={onClick}
aria-label={label}
>
<Icon className="mx_Icon mx_Icon_16" />
</AccessibleButton>
);
};

View file

@ -54,13 +54,11 @@ export const VoiceBroadcastHeader: React.FC<VoiceBroadcastHeaderProps> = ({
const broadcast = showBroadcast && (
<div className="mx_VoiceBroadcastHeader_line">
<LiveIcon className="mx_Icon mx_Icon_16" />
{ _t("Voice broadcast") }
{_t("Voice broadcast")}
</div>
);
const liveBadge = live !== "not-live" && (
<LiveBadge grey={live === "grey"} />
);
const liveBadge = live !== "not-live" && <LiveBadge grey={live === "grey"} />;
const closeButton = showClose && (
<AccessibleButton onClick={onCloseClick}>
@ -78,7 +76,7 @@ export const VoiceBroadcastHeader: React.FC<VoiceBroadcastHeaderProps> = ({
const buffering = showBuffering && (
<div className="mx_VoiceBroadcastHeader_line">
<Spinner w={14} h={14} />
{ _t("Buffering…") }
{_t("Buffering…")}
</div>
);
@ -94,22 +92,22 @@ export const VoiceBroadcastHeader: React.FC<VoiceBroadcastHeaderProps> = ({
title={_t("Change input device")}
>
<MicrophoneIcon className="mx_Icon mx_Icon_16" />
<span>{ microphoneLabel }</span>
<span>{microphoneLabel}</span>
</AccessibleTooltipButton>
);
return <div className="mx_VoiceBroadcastHeader">
<RoomAvatar room={room} width={32} height={32} />
<div className="mx_VoiceBroadcastHeader_content">
<div className="mx_VoiceBroadcastHeader_room">
{ room.name }
return (
<div className="mx_VoiceBroadcastHeader">
<RoomAvatar room={room} width={32} height={32} />
<div className="mx_VoiceBroadcastHeader_content">
<div className="mx_VoiceBroadcastHeader_room">{room.name}</div>
{microphoneLine}
{timeLeftLine}
{broadcast}
{buffering}
</div>
{ microphoneLine }
{ timeLeftLine }
{ broadcast }
{ buffering }
{liveBadge}
{closeButton}
</div>
{ liveBadge }
{ closeButton }
</div>;
);
};

View file

@ -20,8 +20,10 @@ import { Icon as LiveIcon } from "../../../../res/img/element-icons/live.svg";
import { _t } from "../../../languageHandler";
export const VoiceBroadcastRoomSubtitle = () => {
return <div className="mx_RoomTile_subtitle mx_RoomTile_subtitle--voice-broadcast">
<LiveIcon className="mx_Icon mx_Icon_16" />
{ _t("Live") }
</div>;
return (
<div className="mx_RoomTile_subtitle mx_RoomTile_subtitle--voice-broadcast">
<LiveIcon className="mx_Icon mx_Icon_16" />
{_t("Live")}
</div>
);
};