diff --git a/www/src/types/types.ts b/www/src/types/types.ts index 8e76d4c306..628c76bcad 100644 --- a/www/src/types/types.ts +++ b/www/src/types/types.ts @@ -9,7 +9,7 @@ export interface IUsage { filePath: string, line: number, column: number, - version: string, + index: number, } export interface IComponentUsageData { @@ -24,14 +24,14 @@ export interface IComponentUsageData { export interface IDependentProjectsUsages extends Omit { version: string, name: string, - repository: { type: string, url: string }, + repository: { type: string, url: string } | string, folderName: string, } export interface IDependentUsage { version?: string, name?: string, - repository?: { type: string, url: string }, + repository?: { type: string, url: string } | string, repositoryUrl?: string, count: number, folderName?: string, diff --git a/www/src/utils/getDependentProjectsUsages.tsx b/www/src/utils/getDependentProjectsUsages.tsx index 2657640f05..9b15246f77 100644 --- a/www/src/utils/getDependentProjectsUsages.tsx +++ b/www/src/utils/getDependentProjectsUsages.tsx @@ -3,9 +3,8 @@ import dependentProjectsAnalysis from '../../../dependent-usage.json'; // eslint import getGithubProjectUrl from './getGithubProjectUrl'; import { IDependentProjectsUsages, IDependentUsage, IUsage } from '../types/types'; -const { - projectUsages: dependentProjectsUsages, -} = dependentProjectsAnalysis; +const { projectUsages } = dependentProjectsAnalysis; +const dependentProjectsUsages = projectUsages as unknown as IDependentProjectsUsages[]; export default function getDependentProjectsUsages() { const dependentProjects: IDependentUsage[] = [];