refactor: use handleStart prop
This commit is contained in:
@@ -6,7 +6,7 @@ import { modalStyle } from "./AddWhereCondModal";
|
|||||||
|
|
||||||
interface IntegrationProps {
|
interface IntegrationProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
handleSubmit: (data: IntegrationSettings) => void;
|
handleStart: (data: IntegrationSettings) => void;
|
||||||
handleClose: () => void;
|
handleClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ export interface IntegrationSettings {
|
|||||||
data: string;
|
data: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const IntegrationSettingsModal = ({ isOpen, handleSubmit, handleClose }: IntegrationProps) => {
|
export const IntegrationSettingsModal = ({ isOpen, handleStart, handleClose }: IntegrationProps) => {
|
||||||
|
|
||||||
const [settings, setSettings] = useState<IntegrationSettings>({
|
const [settings, setSettings] = useState<IntegrationSettings>({
|
||||||
credentials: '',
|
credentials: '',
|
||||||
@@ -83,7 +83,7 @@ export const IntegrationSettingsModal = ({ isOpen, handleSubmit, handleClose }:
|
|||||||
fullWidth
|
fullWidth
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button variant="contained" color="primary" onClick={() => handleSubmit(settings)} style={{ marginTop: '10px' }}>
|
<Button variant="contained" color="primary" onClick={() => handleStart(settings)} style={{ marginTop: '10px' }}>
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user