Sha256: ad374db1349415afc1eaee7040df6c4e5839b4e7801382f7d1ac933a93126bce
Contents?: true
Size: 1 KB
Versions: 2
Compression:
Stored size: 1 KB
Contents
import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import PropTypes from 'prop-types'; import PreupgradeReports from './PreupgradeReports'; import { selectPreupgradeReports, selectLoadingPreupgradeReports, selectError, } from './PreupgradeReportsSelectors'; import { getPreupgradeReports } from './PreupgradeReportsActions'; const WrappedPreupgradeReports = ({ url }) => { const loading = useSelector(state => selectLoadingPreupgradeReports(state)); const preupgradeReports = useSelector(state => selectPreupgradeReports(state) ); const error = useSelector(state => selectError(state)); const dispatch = useDispatch(); useEffect(() => { dispatch(getPreupgradeReports(url)); }, [url]); return ( <PreupgradeReports preupgradeReports={preupgradeReports} error={error} loading={loading} /> ); }; WrappedPreupgradeReports.propTypes = { url: PropTypes.string.isRequired, }; export default WrappedPreupgradeReports;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_leapp-0.0.5 | webpack/components/PreupgradeReports/index.js |
foreman_leapp-0.0.4 | webpack/components/PreupgradeReports/index.js |