Format code

This commit is contained in:
Robin
2023-10-11 10:42:04 -04:00
parent b28e465122
commit 614bc82402
112 changed files with 628 additions and 602 deletions

View File

@@ -74,7 +74,7 @@ const CallTile: FC<CallTileProps> = ({ name, avatarUrl, room }) => {
to={getRelativeRoomUrl(
room.roomId,
room.name,
roomSharedKey ?? undefined
roomSharedKey ?? undefined,
)}
className={styles.callTileLink}
>
@@ -92,7 +92,7 @@ const CallTile: FC<CallTileProps> = ({ name, avatarUrl, room }) => {
value={getAbsoluteRoomUrl(
room.roomId,
room.name,
roomSharedKey ?? undefined
roomSharedKey ?? undefined,
)}
/>
</div>

View File

@@ -56,7 +56,7 @@ export const RegisteredView: FC<Props> = ({ client }) => {
useState(false);
const onDismissJoinExistingCallModal = useCallback(
() => setJoinExistingCallModalOpen(false),
[setJoinExistingCallModalOpen]
[setJoinExistingCallModalOpen],
);
const [e2eeEnabled] = useEnableE2EE();
@@ -77,15 +77,15 @@ export const RegisteredView: FC<Props> = ({ client }) => {
const createRoomResult = await createRoom(
client,
roomName,
e2eeEnabled ?? false
e2eeEnabled ?? false,
);
history.push(
getRelativeRoomUrl(
createRoomResult.roomId,
roomName,
createRoomResult.password
)
createRoomResult.password,
),
);
}
@@ -102,7 +102,7 @@ export const RegisteredView: FC<Props> = ({ client }) => {
}
});
},
[client, history, setJoinExistingCallModalOpen, e2eeEnabled]
[client, history, setJoinExistingCallModalOpen, e2eeEnabled],
);
const recentRooms = useGroupCallRooms(client);

View File

@@ -57,7 +57,7 @@ export const UnauthenticatedView: FC = () => {
useState(false);
const onDismissJoinExistingCallModal = useCallback(
() => setJoinExistingCallModalOpen(false),
[setJoinExistingCallModalOpen]
[setJoinExistingCallModalOpen],
);
const [onFinished, setOnFinished] = useState<() => void>();
const history = useHistory();
@@ -82,7 +82,7 @@ export const UnauthenticatedView: FC = () => {
randomString(16),
displayName,
recaptchaResponse,
true
true,
);
let createRoomResult;
@@ -90,7 +90,7 @@ export const UnauthenticatedView: FC = () => {
createRoomResult = await createRoom(
client,
roomName,
e2eeEnabled ?? false
e2eeEnabled ?? false,
);
} catch (error) {
if (!setClient) {
@@ -124,8 +124,8 @@ export const UnauthenticatedView: FC = () => {
getRelativeRoomUrl(
createRoomResult.roomId,
roomName,
createRoomResult.password
)
createRoomResult.password,
),
);
}
@@ -144,7 +144,7 @@ export const UnauthenticatedView: FC = () => {
setJoinExistingCallModalOpen,
setClient,
e2eeEnabled,
]
],
);
return (

View File

@@ -47,7 +47,7 @@ function getLastTs(client: MatrixClient, r: Room): number {
if (r.getMyMembership() !== "join") {
const membershipEvent = r.currentState.getStateEvents(
"m.room.member",
myUserId
myUserId,
);
if (membershipEvent && !Array.isArray(membershipEvent)) {
@@ -115,7 +115,7 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] {
client.removeListener(GroupCallEventHandlerEvent.Incoming, updateRooms);
client.removeListener(
GroupCallEventHandlerEvent.Participants,
updateRooms
updateRooms,
);
};
}, [client]);