Fixed Bug 69580 - Rooms: Embed: Infinite loader inside embedded file with password
This commit is contained in:
parent
f2410cdd21
commit
ad1b1b9cee
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { useState } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { Text } from "@docspace/shared/components/text";
|
import { Text } from "@docspace/shared/components/text";
|
||||||
@ -49,6 +49,7 @@ import { toastr } from "@docspace/shared/components/toast";
|
|||||||
import { TData } from "@docspace/shared/components/toast/Toast.type";
|
import { TData } from "@docspace/shared/components/toast/Toast.type";
|
||||||
|
|
||||||
import { getLogoUrl } from "@docspace/shared/utils";
|
import { getLogoUrl } from "@docspace/shared/utils";
|
||||||
|
import { frameCallCommand } from "@docspace/shared/utils/common";
|
||||||
import { useTheme } from "styled-components";
|
import { useTheme } from "styled-components";
|
||||||
import { ValidationStatus, WhiteLabelLogoType } from "@docspace/shared/enums";
|
import { ValidationStatus, WhiteLabelLogoType } from "@docspace/shared/enums";
|
||||||
import { validatePublicRoomPassword } from "@docspace/shared/api/rooms";
|
import { validatePublicRoomPassword } from "@docspace/shared/api/rooms";
|
||||||
@ -64,6 +65,8 @@ const FilePassword = ({ shareKey, title, entryTitle }: FilePasswordProps) => {
|
|||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [errorMessage, setErrorMessage] = useState("");
|
const [errorMessage, setErrorMessage] = useState("");
|
||||||
|
|
||||||
|
useEffect(() => frameCallCommand("setIsLoaded"), []);
|
||||||
|
|
||||||
const onChangePassword = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const onChangePassword = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setPassword(e.target.value);
|
setPassword(e.target.value);
|
||||||
!passwordValid && setPasswordValid(true);
|
!passwordValid && setPasswordValid(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user