Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Commit

Permalink
Update name for props, interface
Browse files Browse the repository at this point in the history
  • Loading branch information
kahboom committed Jun 7, 2019
1 parent 666a655 commit bf39ab3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getMetadataValue } from '@syndesis/api';
import * as H from '@syndesis/history';
import { ConnectionOverview } from '@syndesis/models';
import {
ConnectionCard,
ConnectionsGrid,
Expand All @@ -18,8 +17,7 @@ export interface IEditorStepsProps {
loading: boolean;
steps: IUIStep[];

getConnectionHref(connection: ConnectionOverview): H.LocationDescriptor;
getConnectionEditHref?(connection: ConnectionOverview): H.LocationDescriptor;
getEditorStepHref(editorStep: IUIStep): H.LocationDescriptor;
}

export class EditorSteps extends React.Component<IEditorStepsProps> {
Expand Down Expand Up @@ -56,13 +54,13 @@ export class EditorSteps extends React.Component<IEditorStepsProps> {
isTechPreview =
getMetadataValue<string>(
'tech-preview',
s!.connection!.connector!.metadata
s.connection.connector.metadata
) === 'true';
} else if (s.connector!) {
} else if (s.connector) {
isTechPreview =
getMetadataValue<string>(
'tech-preview',
s.connector!.metadata
s.connector.metadata
) === 'true';
}

Expand All @@ -73,7 +71,7 @@ export class EditorSteps extends React.Component<IEditorStepsProps> {
configurationRequired={configurationRequired}
description={s.description || ''}
icon={<EntityIcon entity={s} alt={s.name} width={46} />}
href={this.props.getConnectionHref(s)}
href={this.props.getEditorStepHref(s)}
i18nCannotDelete={t('cannotDelete')}
i18nConfigurationRequired={t('configurationRequired')}
i18nTechPreview={t('techPreview')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Connection } from '@syndesis/models';
import {
ConnectionsListView,
IActiveFilter,
Expand All @@ -24,7 +23,7 @@ function getFilteredAndSortedEditorSteps(
activeFilters.forEach((filter: IActiveFilter) => {
const valueToLower = filter.value.toLowerCase();
filteredAndSortedEditorSteps = filteredAndSortedEditorSteps.filter(
(e: Connection) => e.name.toLowerCase().includes(valueToLower)
(e: IUIStep) => e.name.toLowerCase().includes(valueToLower)
);
});

Expand Down Expand Up @@ -105,8 +104,7 @@ export class EditorStepsWithToolbar extends React.Component<
error={this.props.error}
loading={this.props.loading}
steps={filteredAndSortedEditorSteps}
getConnectionHref={this.props.getConnectionHref}
getConnectionEditHref={this.props.getConnectionEditHref}
getEditorStepHref={this.props.getEditorStepHref}
/>
</ConnectionsListView>
);
Expand Down

0 comments on commit bf39ab3

Please sign in to comment.