Sha256: ffc3921cb6313c6a9a2ffd652cabd51d6aca05c13052d1beb8c0584c32610a6b

Contents?: true

Size: 773 Bytes

Versions: 1

Compression:

Stored size: 773 Bytes

Contents

import React, { useEffect } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { CloudConnectorButton } from './CloudConnectorButton';
import {
  configureCloudConnector,
  getCloudConnector,
} from './CloudConnectorActions';
import { selectStatus, selectJobLink } from './CloudConnectorSelectors';

const ConnectedCloudConnectorButton = () => {
  const status = useSelector(selectStatus);
  const jobLink = useSelector(selectJobLink);
  const dispatch = useDispatch();

  useEffect(() => {
    dispatch(getCloudConnector());
  }, [dispatch]);
  return (
    <CloudConnectorButton
      status={status}
      onClick={() => dispatch(configureCloudConnector())}
      jobLink={jobLink}
    />
  );
};

export default ConnectedCloudConnectorButton;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman_rh_cloud-3.0.15 webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudConnectorButton/index.js