Refactored forms and pages.
This commit is contained in:
1 parent
1325abe31d
commit
6253d55790
57 files changed
+209
-208
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
Button,
|
||||
SubmitButton,
|
||||
} from 'react-basics';
|
||||
import { setValue } from 'store/cache';
|
||||
import useApi from 'components/hooks/useApi';
|
||||
import useMessages from 'components/hooks/useMessages';
|
||||
|
||||
@@ -20,8 +21,9 @@ export function TeamAddForm({ onSave, onClose }) {
|
||||
const handleSubmit = async data => {
|
||||
mutate(data, {
|
||||
onSuccess: async () => {
|
||||
onSave();
|
||||
onClose();
|
||||
setValue('teams', Date.now());
|
||||
onSave?.();
|
||||
onClose?.();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user