Skip to content

Commit

Permalink
remove set
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Feb 10, 2022
1 parent 1a36aea commit e996c81
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ interface DatabaseModalProps {
onHide: () => void;
show: boolean;
databaseId: number | undefined; // If included, will go into edit mode
setDBEngine: string | undefined; // if included goto step 2 with engine already set
dbEngine: string | undefined; // if included goto step 2 with engine already set
}

enum ActionType {
Expand Down Expand Up @@ -429,7 +429,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
onHide,
show,
databaseId,
setDBEngine,
dbEngine,
}) => {
const [db, setDB] = useReducer<
Reducer<Partial<DatabaseObject> | null, DBReducerActionType>
Expand Down Expand Up @@ -854,9 +854,9 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
setLoading(false);
}

if (availableDbs && setDBEngine) {
if (availableDbs && dbEngine) {
// set model if passed into props
setDatabaseModel(setDBEngine);
setDatabaseModel(dbEngine);
}
}, [availableDbs]);

Expand Down

0 comments on commit e996c81

Please sign in to comment.