Skip to content

Commit

Permalink
Actually use our CodeIntegrator component
Browse files Browse the repository at this point in the history
This got lost in the rebase, whoops.
  • Loading branch information
rylnd committed Oct 5, 2019
1 parent 0cf539b commit 0bd656b
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ import { CodeBlock } from '../codeblock/codeblock';
import { history } from '../../utils/url';
import { FrameHeader } from './frame_header';
import { RepoTitle } from './repo_title';
import { CodeIntegrator } from './code_integrator';
import { externalFileURI } from './helpers';
import { frames, results } from './data';
import { frames, Frame, repos, results } from './data';

const associateToService = (frame: Frame) => (repo: string) =>
alert(`repo ${repo} associated with service ${JSON.stringify(frame)}`);

const handleImport = (repo: string) => alert(`import done: ${repo}`);

export const Integrations = () => (
<div className="codeContainer__root codeIntegrations__container">
Expand Down Expand Up @@ -53,6 +59,11 @@ export const Integrations = () => (
<span className="codeIntegrations__preposition">at</span>
<span>line {lineNumber}</span>
</EuiText>
<CodeIntegrator
onRepoSelect={associateToService(frame)}
onImportSuccess={handleImport}
repos={repos}
/>
</EuiFlexGroup>
</div>
);
Expand Down

0 comments on commit 0bd656b

Please sign in to comment.