File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 const [ currentPage , setCurrentPage ] = useState ( 1 ) ;
3838 const [ pageSize , setPageSize ] = useState ( 10 ) ;
3939 const [ sortConfig , setSortConfig ] = useState ( { key : 'entity' , direction : 'asc' } ) ;
40+ const [ maxAliasSimilarity , setMaxAliasSimilarity ] = useState ( 0 ) ;
41+ const [ minAliasSimilarity , setMinAliasSimilarity ] = useState ( 0 ) ;
4042
4143 // Sync URL with filters
4244 useEffect ( ( ) => {
7678 } ) ;
7779 processedEntities . push ( ...rows ) ;
7880 } ) ;
81+
82+ let maxSimilarity = 0 ;
83+ let minSimilarity = Infinity ;
84+ processedEntities . forEach ( e => {
85+ e . similar_aliases . forEach ( a => {
86+ if ( a . similarity > maxSimilarity ) {
87+ maxSimilarity = a . similarity ;
88+ }
89+ if ( a . similarity < minSimilarity ) {
90+ minSimilarity = a . similarity ;
91+ }
92+ } )
93+ } ) ;
94+
95+ setMaxAliasSimilarity ( maxSimilarity ) ;
96+ setMinAliasSimilarity ( minSimilarity ) ;
7997 setEntities ( processedEntities ) ;
8098 setLoading ( false ) ;
8199 } )
You can’t perform that action at this time.
0 commit comments