Project

General

Profile

« Previous | Next » 

Revision bcb8a5e0

Added by Amir Fefer almost 6 years ago

Fixes #23966 - empty state buttons work with react router

View differences:

webpack/move_to_foreman/components/common/emptyState/index.js
/* eslint-disable */
import React from 'react';
import { EmptyState as PfEmptyState, Button } from 'patternfly-react';
import { LinkContainer } from 'react-router-bootstrap';
const EmptyState = (props) => {
const {
......
)}
{action && (
<PfEmptyState.Action>
<Button href={action.url} bsStyle="primary" bsSize="large">
{action.title}
</Button>
<LinkContainer to={action.url}>
<Button href={action.url} bsStyle="primary" bsSize="large">
{action.title}
</Button>
</LinkContainer>
</PfEmptyState.Action>
)}
{secondayActions && (
<PfEmptyState.Action secondary>
{secondayActions.map(item => (
<Button href={action.url} title={action.title}>
{item.title}
</Button>
))}
<LinkContainer to={item.url}>
<Button href={item.url} title={item.title}>
{item.title}
</Button>
</LinkContainer>
))}
</PfEmptyState.Action>
)}
</PfEmptyState>

Also available in: Unified diff