Skip to content

Commit

Permalink
Fix frontend build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasperhino committed Dec 9, 2024
1 parent 0f09e6b commit b3ab879
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Repo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ interface RepoParams {
repo: string;
}

interface BranchType {
name: string;
}

export default function Repo({ owner, repo }: RepoParams) {
const [refs, setRefs] = useState<ListRefsResponseType>();
const [branches, setBranches] = useState<ListBranchesResponseType>();
Expand Down Expand Up @@ -66,7 +70,7 @@ export default function Repo({ owner, repo }: RepoParams) {
</TableHead>
<TableBody>
{branches &&
branches.data.map((branch) => (
branches.data.map((branch: BranchType) => (
<TableRow
key={branch.name}
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/RepoBreadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import { Box, Stack, Breadcrumbs, Link } from "@mui/material";
import GitHubIcon from "@mui/icons-material/GitHub";
import { Link as RouterLink } from "react-router-dom";

interface RepoBreadcrumbsProps {
breadcrumbs: JSX.Element[];
breadcrumbs: React.ReactNode[];
}

export default function RepoBreadcrumbs({ breadcrumbs }: RepoBreadcrumbsProps) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function getMetricsBlob(
return await Promise.all(
files.map(async (file) => {
const found_file = response.data.tree.find(
(object) => object.path == file
(object: { path: string }) => object.path == file
);

const file_sha = found_file?.sha;
Expand Down

0 comments on commit b3ab879

Please sign in to comment.