diff --git a/ui/components/digital-right-indicator-list.tsx b/ui/components/digital-right-indicator-list.tsx index e904ce0e..2dd447db 100644 --- a/ui/components/digital-right-indicator-list.tsx +++ b/ui/components/digital-right-indicator-list.tsx @@ -1,6 +1,7 @@ import { DigitalRightsPillar} from "database/ancillary"; import { Score } from "database/processed/db"; import { roundNumber } from "lib"; +import { ReactChild, ReactFragment, ReactPortal } from "react"; import { FaLink, FaSourcetree } from "react-icons/fa"; import useSWR from "swr"; @@ -150,18 +151,18 @@ const Indicator = ({ showSources, isShowingRawScores, }: { - indicator: Score & { sources: Score[] }; + indicator: any & { sources: any[] }; showSources: boolean; isShowingRawScores: boolean; }) => { const hasNoData = indicator.data_col === null; // we want to get the source name from the list of sources, // but if empty, we need to fall back to the indicator's "Data Source" - const sources = (indicator.sources || [indicator]).map(indicator => ({ - link: indicator["Data Link"], - source: indicator["Data Source"], - year: indicator["Year"] - })).filter(indicator => indicator.source && indicator.link) + const sources = (indicator.sources || [indicator]).map((ind: { [x: string]: any; }) => ({ + link: ind["Source URL"], + source: ind["Source Name"], + year: ind["Year"] + })).filter((ind: { source: any; link: any; }) => ind.source && ind.link); const value = +indicator.new_rank_score; const disp_val = value == 0 ? 0 : roundNumber(value, 2); return ( @@ -196,7 +197,7 @@ const Indicator = ({ )} {showSources && sources.length > 0 && (