Login:Src:Components: some changes
This commit is contained in:
parent
d2ef067e18
commit
7299b88c18
@ -72,7 +72,7 @@ export const GreetingCreateUserContainer = ({
|
||||
<img src={logoUrl} className="portal-logo" alt="greeting-logo" />
|
||||
{type === "LinkInvite" && (
|
||||
<div className="tooltip">
|
||||
<Text fontSize="16px">
|
||||
<Text fontSize="16px" as="div" className="invitation-text">
|
||||
{roomData.title ? (
|
||||
<Trans
|
||||
t={t}
|
||||
|
@ -79,6 +79,12 @@ export const StyledForm = styled(Box)`
|
||||
.set-app-description {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
|
||||
.portal-logo {
|
||||
margin: 0 auto;
|
||||
max-width: 386px;
|
||||
height: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
.set-app-title {
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
"use client";
|
||||
|
||||
import { ChangeEvent, useContext, useState } from "react";
|
||||
import { ChangeEvent, useContext, useEffect, useRef, useState } from "react";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { useTheme } from "styled-components";
|
||||
|
||||
@ -61,8 +61,6 @@ import { TError } from "@/types";
|
||||
import { ConfirmRouteContext } from "../ConfirmRoute";
|
||||
import { GreetingContainer } from "../GreetingContainer";
|
||||
|
||||
const PROXY_BASE_URL = combineUrl(window.ClientConfig?.proxy?.url, "/profile");
|
||||
|
||||
type TfaActivationFormProps = {
|
||||
secretKey: string;
|
||||
qrCode: string;
|
||||
@ -86,6 +84,14 @@ const TfaActivationForm = ({
|
||||
|
||||
const { confirmHeader = null } = linkData;
|
||||
|
||||
const proxyBaseUrl = useRef("");
|
||||
useEffect(() => {
|
||||
proxyBaseUrl.current = combineUrl(
|
||||
window.ClientConfig?.proxy?.url,
|
||||
"/profile",
|
||||
);
|
||||
}, []);
|
||||
|
||||
const onSubmit = async () => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
@ -97,7 +103,7 @@ const TfaActivationForm = ({
|
||||
}
|
||||
|
||||
sessionStorage.setItem(OPEN_BACKUP_CODES_DIALOG, "true");
|
||||
window.location.href = PROXY_BASE_URL;
|
||||
window.location.href = proxyBaseUrl.current;
|
||||
} catch (error) {
|
||||
const knownError = error as TError;
|
||||
let errorMessage: string;
|
||||
|
Loading…
Reference in New Issue
Block a user