refactor: return types for hooks
This commit is contained in:
@ -10,7 +10,7 @@ type Props = {
|
||||
};
|
||||
|
||||
type FormType = {
|
||||
name?: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
const EnterNameModal = ({
|
||||
@ -28,7 +28,7 @@ const EnterNameModal = ({
|
||||
});
|
||||
|
||||
const onSubmit = (values: FormType) => {
|
||||
innerProps.onComplete(values.name!);
|
||||
innerProps.onComplete(values.name);
|
||||
context.closeModal(id);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user