diff --git a/src/app/credExplorer/pagerankTable.js b/src/app/credExplorer/pagerankTable.js index 3e9b9c8..e11eee3 100644 --- a/src/app/credExplorer/pagerankTable.js +++ b/src/app/credExplorer/pagerankTable.js @@ -4,6 +4,7 @@ import React from "react"; import stringify from "json-stable-stringify"; import {Graph} from "../../core/graph"; +import type {Address} from "../../core/address"; import {PLUGIN_NAME as GITHUB_PLUGIN_NAME} from "../../plugins/github/pluginName"; import {GIT_PLUGIN_NAME} from "../../plugins/git/types"; import {nodeDescription as githubNodeDescription} from "../../plugins/github/render"; @@ -134,18 +135,37 @@ export class PagerankTable extends React.Component { - {nodesByScore.map((node) => { - const score = pagerankResult.get(node.address).probability; - return ( - - {(score * 100).toPrecision(3)} - {Math.log(score).toPrecision(3)} - {nodeDescription(graph, node.address)} - - ); - })} + {nodesByScore.map((node) => ( + + ))} ); } } + +type RTState = {}; +type RTProps = {| + +address: Address, + +graph: Graph, + +pagerankResult: PagerankResult, +|}; + +class RecursiveTable extends React.Component { + render() { + const {address, graph, pagerankResult} = this.props; + const score = pagerankResult.get(address).probability; + return ( + + {(score * 100).toPrecision(3)} + {Math.log(score).toPrecision(3)} + {nodeDescription(graph, address)} + + ); + } +}