Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Commit

Permalink
feat: parameterize extension links (#55)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: consumers now need to pass in a `link` prop when using the ExtensionStatusPopover.
  • Loading branch information
chrismwendt committed Oct 4, 2018
1 parent 8f9e7a3 commit fc258c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/ExtensionStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as H from 'history'
import * as React from 'react'
import { Link } from 'react-router-dom'
import { Subject, Subscription } from 'rxjs'
import { distinctUntilChanged, map, switchMap } from 'rxjs/operators'
import { ExtensionConnection } from 'sourcegraph/module/client/controller'
Expand All @@ -20,6 +19,7 @@ interface Props<S extends ConfigurationSubject, C extends Settings> extends Cont
className: 'icon-inline' | string
onClick?: () => void
}>
link: React.ComponentType<{ id: string }>
}

interface State {
Expand Down Expand Up @@ -79,7 +79,7 @@ export class ExtensionStatus<S extends ConfigurationSubject, C extends Settings>
key={i}
className="list-group-item py-2 d-flex align-items-center justify-content-between"
>
<Link to={`/extensions/${key.id}`}>{key.id}</Link>
<this.props.link id={key.id} />
</div>
))}
</div>
Expand Down

0 comments on commit fc258c5

Please sign in to comment.