diff --git a/frontend/package.json b/frontend/package.json index 4d491b1..b2de1a6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -2,6 +2,7 @@ "name": "treemap-github-embedding", "version": "0.6.1", "private": "true", + "type": "module", "homepage": "https://hpicgs.github.io/github-software-analytics-embedding/", "scripts": { "build": "tsc --noEmit && vite build", diff --git a/frontend/src/components/Repo.tsx b/frontend/src/components/Repo.tsx index 92c16f3..9d1edcb 100644 --- a/frontend/src/components/Repo.tsx +++ b/frontend/src/components/Repo.tsx @@ -26,6 +26,10 @@ interface RepoParams { repo: string; } +interface BranchType { + name: string; +} + export default function Repo({ owner, repo }: RepoParams) { const [refs, setRefs] = useState(); const [branches, setBranches] = useState(); @@ -66,7 +70,7 @@ export default function Repo({ owner, repo }: RepoParams) { {branches && - branches.data.map((branch) => ( + branches.data.map((branch: BranchType) => ( { const found_file = response.data.tree.find( - (object) => object.path == file + (object: { path: string }) => object.path == file ); const file_sha = found_file?.sha;