cluedin-widget
Version:
This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.
37 lines (30 loc) • 1 kB
JSX
import React, { Component } from 'react';
import providerHelper from '../../helpers/provider.js';
import { CluedInListItem, CluedInListImage } from '../generics/cluedinList.jsx';
import CluedInButton from '../generics/cluedinbutton.jsx';
export default class CurrentProviderListRow extends Component {
reAuth() {
const {
onAuthHandler,
provider,
} = this.props;
onAuthHandler(provider);
}
render() {
const {
provider,
} = this.props;
let providerConfig = providerHelper.getProviderConfig(provider.Name);
let providerIconContent;
if (!providerConfig) {
providerIconContent = <CluedInListImage name={provider.Name} url={providerConfig.icon}></CluedInListImage>;
}
return <CluedInListItem>
{providerIconContent}
<h4>{provider.Name}</h4>
<div className="cluedIn_reAuth">
<CluedInButton click={this.reAuth.bind(this)} message="Re-Authenticate"></CluedInButton>
</div>
</CluedInListItem>;
}
};