Sha256: f7b7e99efb92caafdad1e0e7ff1a04a7fd62a2c9fa45c9f1ceca3233b357f651

Contents?: true

Size: 1.16 KB

Versions: 54

Compression:

Stored size: 1.16 KB

Contents

import React, {
  createContext,
  useState,
} from 'react';

import { PropTypes } from 'prop-types';

export const BulkDeleteContext = createContext({});

const BulkDeleteContextWrapper = ({
  children, versions, onClose,
}) => {
  const [selectedEnvForAK, setSelectedEnvForAK] = useState([]);
  const [selectedCVForAK, setSelectedCVForAK] = useState(null);
  const [selectedEnvForHosts, setSelectedEnvForHosts] = useState([]);
  const [selectedCVForHosts, setSelectedCVForHosts] = useState(null);
  const [currentStep, setCurrentStep] = useState(1);

  return (
    <BulkDeleteContext.Provider value={{
      onClose,
      versions,
      selectedEnvForAK,
      setSelectedEnvForAK,
      selectedCVForAK,
      setSelectedCVForAK,
      selectedEnvForHosts,
      setSelectedEnvForHosts,
      selectedCVForHosts,
      setSelectedCVForHosts,
      currentStep,
      setCurrentStep,
    }}
    >
      {children}
    </BulkDeleteContext.Provider>);
};

BulkDeleteContextWrapper.propTypes = {
  versions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
  onClose: PropTypes.func.isRequired,
  children: PropTypes.element.isRequired,
};

export default BulkDeleteContextWrapper;

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.15.0.rc1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.14.1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.14.0 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.14.0.rc3 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.14.0.rc2 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.14.0.rc1.1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.14.0.rc1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.13.1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.13.0 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.12.1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.13.0.rc1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.12.0 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.12.0.rc3 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.12.0.rc2 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.12.0.rc1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.11.1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.11.0 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.11.0.rc2 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js
katello-4.11.0.rc1 webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js