Skip to content

Commit

Permalink
Fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Mar 6, 2020
1 parent 892d47c commit 892f82c
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,17 @@ export const ConnectorAddModal = ({
const setConnector = (value: any) => {
dispatch({ command: { type: 'setConnector' }, payload: { key: 'connector', value } });
};
const [serverError, setServerError] = useState<{
body: { message: string; error: string };
} | null>(null);
const [serverError, setServerError] = useState<
| {
body: { message: string; error: string };
}
| undefined
>(undefined);

const closeModal = useCallback(() => {
setAddModalVisibility(false);
setConnector(initialConnector);
setServerError(null);
setServerError(undefined);
}, [initialConnector, setAddModalVisibility]);

if (!addModalVisible) {
Expand Down

0 comments on commit 892f82c

Please sign in to comment.