mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: remove toast when clicking cancel
This commit is contained in:
parent
67f73ff598
commit
cdbf395aa2
@ -1,7 +1,7 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { TextField, FormControlLabel, Switch } from '@material-ui/core';
|
import { TextField, FormControlLabel, Switch, Button } from '@material-ui/core';
|
||||||
import { FormButtons, styles as commonStyles } from '../../common';
|
import { styles as commonStyles } from '../../common';
|
||||||
import { trim } from '../../common/util';
|
import { trim } from '../../common/util';
|
||||||
import { AddonParameters } from './AddonParameters/AddonParameters';
|
import { AddonParameters } from './AddonParameters/AddonParameters';
|
||||||
import { AddonEvents } from './AddonEvents/AddonEvents';
|
import { AddonEvents } from './AddonEvents/AddonEvents';
|
||||||
@ -149,7 +149,7 @@ export const AddonForm = ({ editMode, provider, addon, fetch }) => {
|
|||||||
</a>
|
</a>
|
||||||
<p className={commonStyles.error}>{errors.general}</p>
|
<p className={commonStyles.error}>{errors.general}</p>
|
||||||
</section>
|
</section>
|
||||||
<form onSubmit={onSubmit}>
|
<form>
|
||||||
<section className={styles.formSection}>
|
<section className={styles.formSection}>
|
||||||
<TextField
|
<TextField
|
||||||
size="small"
|
size="small"
|
||||||
@ -203,10 +203,10 @@ export const AddonForm = ({ editMode, provider, addon, fetch }) => {
|
|||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
<section className={styles.formSection}>
|
<section className={styles.formSection}>
|
||||||
<FormButtons
|
<Button type="submit" color="primary" variant="contained">
|
||||||
submitText={submitText}
|
{submitText}
|
||||||
onCancel={handleCancel}
|
</Button>
|
||||||
/>
|
<Button onClick={handleCancel}>Cancel</Button>
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
</PageContent>
|
</PageContent>
|
||||||
|
Loading…
Reference in New Issue
Block a user