Skip to content

Commit

Permalink
fix: react minified issue fixes
Browse files Browse the repository at this point in the history
Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade committed Nov 26, 2024
1 parent 3593255 commit 69467ef
Show file tree
Hide file tree
Showing 57 changed files with 196 additions and 620 deletions.
12 changes: 6 additions & 6 deletions src/commonComponents/ConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ interface IProps {
onSuccess: (flag: boolean) => void;
message: string | ReactElement |React.ReactNode;
isProcessing: boolean;
success: string | null;
failure: string | null;
setFailure: (flag: string | null) => void;
setSuccess: (flag: string | null) => void;
success: string;
failure: string;
setFailure: (flag: string) => void;
setSuccess: (flag: string) => void;
buttonTitles: string[];
loading:boolean;
warning?:String
Expand Down Expand Up @@ -83,7 +83,7 @@ const ConfirmationModal = ({ openModal, closeModal, onSuccess, message, isProces
message={success}
type={'success'}
onAlertClose={() => {
setSuccess && setSuccess(null);
setSuccess && setSuccess('');
}}
/>
</div>
Expand All @@ -94,7 +94,7 @@ const ConfirmationModal = ({ openModal, closeModal, onSuccess, message, isProces
message={failure}
type={'failure'}
onAlertClose={() => {
setFailure && setFailure(null);
setFailure && setFailure('');
}}
/>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/commonComponents/DeviceDetailsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import type { AxiosResponse } from "axios";
import { apiStatusCodes } from "../config/CommonConstant";
import { dateConversion } from "../utils/DateConversion";
import DateTooltip from "../components/Tooltip";
import React from "react";

interface IResponseMessages {type: "error" | "success", message: string}

const DeviceDetails = (props: { deviceFriendlyName: string, createDateTime: string, credentialID: string, refreshList: () => void, disableRevoke: boolean, responseMessages: (value: IResponseMessages) => void }) => {
const [openModal, setOpenModal] = useState<boolean>(false);
const [openEditModel, setOpenEditModel] = useState<boolean>(false)
const [editSuccess, setEditSuccess] = useState<string | null>(null)
const [editfailure, setEditFailure] = useState<string | null>(null)
const [editSuccess, setEditSuccess] = useState<string>('')
const [editfailure, setEditFailure] = useState<string>('')
const handleDeleteModel = (flag: boolean) => {
setOpenModal(flag)
}
Expand Down
1 change: 1 addition & 0 deletions src/commonComponents/EditPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Button, Label, Modal } from 'flowbite-react';
import { Field, Form, Formik } from 'formik';
import * as yup from 'yup';
import { useRef } from 'react';
import React from 'react';

const EditModal = (props: {
openModal: boolean;
Expand Down
8 changes: 4 additions & 4 deletions src/commonComponents/PasseyAddDevicePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const PasskeyAddDevice = (props: {
registerWithPasskey: (flag: boolean) => Promise<void>
}
) => {
const [fidoUserError, setFidoUserError] = useState<string | null>(null)
const [fidoUserError, setFidoUserError] = useState<string>('')
const [nextflag, setNextFlag] = useState<boolean>(false)
const [success, setSuccess] = useState<string | null>(null)
const [success, setSuccess] = useState<string>('')
const [passwordVisible, setPasswordVisible] = useState(false);

const savePassword = async (values: PasswordValue) => {
Expand Down Expand Up @@ -60,8 +60,8 @@ const PasskeyAddDevice = (props: {
<Alert
color={success ? "success" : "failure"}
onDismiss={() => {
setSuccess(null)
setFidoUserError(null)
setSuccess('')
setFidoUserError('')
}
}
>
Expand Down
Loading

0 comments on commit 69467ef

Please sign in to comment.