Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
helloanoop authored Dec 15, 2024
1 parent 3f0749e commit 76cb186
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import Modal from 'components/Modal';
import { addGlobalEnvironment } from 'providers/ReduxStore/slices/global-environments';

const CreateEnvironment = ({ onClose }) => {
const global_envs = useSelector((state) => state?.globalEnvironments?.globalEnvironments);
const globalEnvs = useSelector((state) => state?.globalEnvironments?.globalEnvironments);

const validateEnvironmentName = (name) => {
const trimmedName = name?.toLowerCase().trim();
return global_envs.every((env) => env?.name?.toLowerCase().trim() !== trimmedName);
return globalEnvs.every((env) => env?.name?.toLowerCase().trim() !== trimmedName);
};

const dispatch = useDispatch();
Expand Down

0 comments on commit 76cb186

Please sign in to comment.