Metamigo frontend updates
This commit is contained in:
parent
9edbeed056
commit
6e3e178187
9 changed files with 56 additions and 56 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { FC, useEffect, useState } from "react";
|
||||
import {
|
||||
Show,
|
||||
SimpleShowLayout,
|
||||
|
|
@ -175,7 +175,7 @@ const VerificationCodeRequest = ({
|
|||
onSuccess,
|
||||
onError,
|
||||
}: any) => {
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
await handleRequestCode({
|
||||
verifyMode,
|
||||
|
|
@ -209,8 +209,8 @@ const VerificationCaptcha = ({
|
|||
onError,
|
||||
handleClose,
|
||||
}: any) => {
|
||||
const [code, setCode] = React.useState(undefined);
|
||||
const [isSubmitting, setSubmitting] = React.useState(false);
|
||||
const [code, setCode] = useState(undefined);
|
||||
const [isSubmitting, setSubmitting] = useState(false);
|
||||
|
||||
const handleSubmitVerification = async () => {
|
||||
setSubmitting(true);
|
||||
|
|
@ -271,10 +271,10 @@ const VerificationCodeInput = ({
|
|||
handleRestartVerification,
|
||||
confirmVerification,
|
||||
}: any) => {
|
||||
const [code, setValue] = React.useState("");
|
||||
const [isSubmitting, setSubmitting] = React.useState(false);
|
||||
const [isValid, setValid] = React.useState(false);
|
||||
const [submissionError, setSubmissionError] = React.useState(undefined);
|
||||
const [code, setValue] = useState("");
|
||||
const [isSubmitting, setSubmitting] = useState(false);
|
||||
const [isValid, setValid] = useState(false);
|
||||
const [submissionError, setSubmissionError] = useState(undefined);
|
||||
const translate = useTranslate();
|
||||
|
||||
const validator = (v: any) => v.trim().length === 6;
|
||||
|
|
@ -361,7 +361,7 @@ const VerificationCodeInput = ({
|
|||
};
|
||||
|
||||
const VerificationCodeDialog = (props: any) => {
|
||||
const [stage, setStage] = React.useState("request");
|
||||
const [stage, setStage] = useState("request");
|
||||
const onRequestSuccess = () => setStage("verify");
|
||||
const onRestartVerification = () => setStage("request");
|
||||
const handleClose = () => {
|
||||
|
|
@ -412,8 +412,8 @@ const VerificationCodeDialog = (props: any) => {
|
|||
};
|
||||
|
||||
const SignalBotShowActions = ({ data }: any) => {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const [verifyMode, setVerifyMode] = React.useState("");
|
||||
const [open, setOpen] = useState(false);
|
||||
const [verifyMode, setVerifyMode] = useState("");
|
||||
const refresh = useRefresh();
|
||||
|
||||
const handleOpenSMS = () => {
|
||||
|
|
@ -458,7 +458,7 @@ const SignalBotShowActions = ({ data }: any) => {
|
|||
);
|
||||
};
|
||||
|
||||
const SignalBotShow = (props: ShowProps) => (
|
||||
const SignalBotShow: FC<ShowProps> = (props) => (
|
||||
<Show
|
||||
actions={<SignalBotShowActions />}
|
||||
{...props}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue