Skip to content

Commit

Permalink
Merge pull request #8599 from bipuladh/fix-multus
Browse files Browse the repository at this point in the history
Make multus behaviour common between two modes
  • Loading branch information
openshift-merge-robot committed Apr 9, 2021
2 parents f12f1cf + 92fe0ff commit b49d385
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -11,9 +11,13 @@ export const Configure: React.FC<ConfigureProps> = ({ state, dispatch, mode }) =

const { networkType: nwType, publicNetwork, clusterNetwork } = state;

const setNetworkType = (networkType: NetworkType) =>
const setNetworkType = (networkType: NetworkType) => {
dispatch({ type: ActionType.SET_NETWORK_TYPE, payload: networkType });

if (networkType === NetworkType.DEFAULT) {
dispatch({ type: ActionType.SET_CLUSTER_NETWORK, payload: '' });
dispatch({ type: ActionType.SET_PUBLIC_NETWORK, payload: '' });
}
};
const setNetwork = (type, payload) =>
type === 'Cluster'
? dispatch({ type: ActionType.SET_CLUSTER_NETWORK, payload })
Expand Down

0 comments on commit b49d385

Please sign in to comment.