Skip to content

Commit

Permalink
refactor:popupModal
Browse files Browse the repository at this point in the history
Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade committed Oct 4, 2023
1 parent e602acd commit c79a044
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/PopupModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";


import * as yup from "yup"

Expand Down Expand Up @@ -192,6 +192,16 @@ const PopupModal = (props: { openModal: boolean; isorgModal : boolean ;setMessag
setLoading(false);
}
}


const submit= (values :EcoValues | Values)=>{
if(props.isorgModal){
sumitCreateOrganization(values)
}else{
submitCreateEcosystem(values)
}

}
const renderEcosystemModal = () =>{
return(
<Modal show={props.openModal} onClose={() => {
Expand Down Expand Up @@ -237,7 +247,7 @@ const PopupModal = (props: { openModal: boolean; isorgModal : boolean ;setMessag
{ resetForm }: FormikHelpers<Values>
) => {

{props.isorgModal? sumitCreateOrganization(values):submitCreateEcosystem(values)}
submit(values)

}}
>
Expand Down

0 comments on commit c79a044

Please sign in to comment.