Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Import useState directly
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Aug 14, 2024
1 parent 6611b07 commit 8a07a6d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/views/settings/AddRemoveThreepids.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import React, { useCallback, useRef } from "react";
import React, { useCallback, useRef, useState } from "react";
import { logger } from "matrix-js-sdk/src/logger";
import {
IRequestMsisdnTokenResponse,
Expand Down Expand Up @@ -46,13 +46,13 @@ interface ExistingThreepidProps {
}

const ExistingThreepid: React.FC<ExistingThreepidProps> = ({ mode, threepid, onChange, disabled }) => {
const [isConfirming, setIsConfirming] = React.useState(false);
const [isConfirming, setIsConfirming] = useState(false);
const client = useMatrixClientContext();
const bindTask = useRef<AddThreepid | undefined>();

const [isVerifyingBind, setIsVerifyingBind] = React.useState(false);
const [continueDisabled, setContinueDisabled] = React.useState(false);
const [verificationCode, setVerificationCode] = React.useState("");
const [isVerifyingBind, setIsVerifyingBind] = useState(false);
const [continueDisabled, setContinueDisabled] = useState(false);
const [verificationCode, setVerificationCode] = useState("");

const onRemoveClick = useCallback((e: ButtonEvent) => {
e.stopPropagation();
Expand Down Expand Up @@ -298,12 +298,12 @@ const AddThreepidSection: React.FC<{ medium: "email" | "msisdn"; disabled?: bool
onChange,
}) => {
const addTask = React.useRef<AddThreepid | undefined>();

This comment has been minimized.

Copy link
@t3chguy

t3chguy Aug 14, 2024

Member

same probably here

const [newThreepidInput, setNewThreepidInput] = React.useState("");
const [phoneCountryInput, setPhoneCountryInput] = React.useState("");
const [verificationCodeInput, setVerificationCodeInput] = React.useState("");
const [isVerifying, setIsVerifying] = React.useState(false);
const [continueDisabled, setContinueDisabled] = React.useState(false);
const [sentToMsisdn, setSentToMsisdn] = React.useState("");
const [newThreepidInput, setNewThreepidInput] = useState("");
const [phoneCountryInput, setPhoneCountryInput] = useState("");
const [verificationCodeInput, setVerificationCodeInput] = useState("");
const [isVerifying, setIsVerifying] = useState(false);
const [continueDisabled, setContinueDisabled] = useState(false);
const [sentToMsisdn, setSentToMsisdn] = useState("");

const client = useMatrixClientContext();

Expand Down

0 comments on commit 8a07a6d

Please sign in to comment.