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