Remove unnecessary usage of a roomIdOrAlias
In most cases the `roomId` was used despite the name of the variable.
This commit is contained in:
@@ -70,10 +70,9 @@ export function RegisteredView({ client, isPasswordlessUser }: Props) {
|
||||
setError(undefined);
|
||||
setLoading(true);
|
||||
|
||||
const [roomIdOrAlias] = await createRoom(client, roomName, ptt);
|
||||
|
||||
if (roomIdOrAlias) {
|
||||
history.push(`/room/${roomIdOrAlias}`);
|
||||
const [roomAlias] = await createRoom(client, roomName, ptt);
|
||||
if (roomAlias) {
|
||||
history.push(`/room/${roomAlias}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,9 +79,9 @@ export const UnauthenticatedView: FC = () => {
|
||||
true
|
||||
);
|
||||
|
||||
let roomIdOrAlias: string;
|
||||
let roomAlias: string;
|
||||
try {
|
||||
[roomIdOrAlias] = await createRoom(client, roomName, ptt);
|
||||
[roomAlias] = await createRoom(client, roomName, ptt);
|
||||
} catch (error) {
|
||||
if (!setClient) {
|
||||
throw error;
|
||||
@@ -111,7 +111,7 @@ export const UnauthenticatedView: FC = () => {
|
||||
}
|
||||
|
||||
setClient({ client, session });
|
||||
history.push(`/room/${roomIdOrAlias}`);
|
||||
history.push(`/room/${roomAlias}`);
|
||||
}
|
||||
|
||||
submit().catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user